diff --git a/misc-scripts/production_database/sql/tables.sql b/misc-scripts/production_database/sql/tables.sql
index 224add478c0e0d6585c505f9b2096f58db8d825a..1aac8c0a4ef56406e777ee6804f5885a869a507a 100644
--- a/misc-scripts/production_database/sql/tables.sql
+++ b/misc-scripts/production_database/sql/tables.sql
@@ -123,14 +123,13 @@ WHERE species.is_current = 1;
 
 CREATE VIEW db_current AS
 SELECT
-  d.db_id AS db_id,
   species.species_id AS species_id,
-  d.db_type AS db_type
+  db.db_id AS db_id,
+  db.db_type AS db_type
 FROM db
   JOIN species USING (species_id)
-  JOIN db d USING (db_id)
 WHERE species.is_current = 1
-  AND d.is_current = 1;
+  AND db.is_current = 1;
 
 -- CREATE VIEW readable_web_data AS
 -- SELECT  CONCAT('{',