diff --git a/packages/scraper/src/robots/catalog-reconcile.ts b/packages/scraper/src/robots/catalog-reconcile.ts index 491de72..df4b291 100644 --- a/packages/scraper/src/robots/catalog-reconcile.ts +++ b/packages/scraper/src/robots/catalog-reconcile.ts @@ -175,7 +175,7 @@ export async function runCatalogReconcile(): Promise { SELECT t.id AS competitor_id, t.part_number, t.standard_name, t.form_factor, t.speed_gbps, t.fiber_type, t.reach_meters, t.wavelengths, v.name AS vendor_name, - MAX(po.time) AS last_price, COUNT(DISTINCT po.id) AS price_count + MAX(po.time) AS last_price, COUNT(*) AS price_count FROM transceivers t JOIN vendors v ON v.id = t.vendor_id JOIN price_observations po ON po.transceiver_id = t.id @@ -187,7 +187,7 @@ export async function runCatalogReconcile(): Promise { AND t.id != $3 GROUP BY t.id, t.part_number, t.standard_name, t.form_factor, t.speed_gbps, t.fiber_type, t.reach_meters, t.wavelengths, v.name - HAVING COUNT(DISTINCT po.id) >= 1 + HAVING COUNT(*) >= 1 `, [fx.form_factor, fx.speed_gbps, fx.id]); for (const cand of candidates) {