diff --git a/server/controllers/BlockchainBlock.ts b/server/controllers/BlockchainBlock.ts
index 285aef5..6818020 100644
--- a/server/controllers/BlockchainBlock.ts
+++ b/server/controllers/BlockchainBlock.ts
@@ -1988,7 +1988,7 @@ export class BlockchainBlockController {
                           Count( CASE  WHEN proof = 'Cuckoo' THEN 1 ELSE NULL END) AS Cuckoo,\
                           Count( CASE WHEN proof = 'ProgPow' THEN 1 ELSE NULL END) AS ProgPow \
                  FROM     blockchain_block \
-                 where height>0 " +
+                 where height > 0 and " +
           timeIntervalQry +
           "GROUP BY DATE_TRUNC('day', timestamp at time zone '" +
           process.env.TIME_ZONE +