Untitled
3 years ago in Plain Text
SELECT
date_upd::date AS update_date,
name_store,
COUNT(name) AS name_cnt
FROM
products_data_all
WHERE
date_upd::date = '2019-06-03'
AND units = 'г'
AND weight::real > 900
GROUP BY
update_date,
name_store
HAVING
COUNT(name) < 10;