Luis Fernandez
04/06/2022, 9:03 PMSELECT product_id, COUNT(*) as views
FROM table
ORDER BY views, product_id DESC
in regular RDBMS I would expect for it to order by the views first and then product id so something like
views, product_id
3 3
3 2
3 1
but pinot does something completely different is doing
views, product_id
1 10
1 9
1 8
anyone has an idea why this may be?Diogo Baeder
04/06/2022, 9:05 PMviews
has only value 1Luis Fernandez
04/06/2022, 9:06 PMLuis Fernandez
04/06/2022, 9:07 PMDiogo Baeder
04/06/2022, 9:09 PMRong R
04/06/2022, 9:21 PMRong R
04/06/2022, 9:22 PMORDER BY views DESC, product_id DESC
Ken Krugler
04/06/2022, 9:23 PMviews
just a COUNT(*)
without any group? So what would that mean? I think there’s a missing GROUP BY product_id
Luis Fernandez
04/06/2022, 9:24 PMRong R
04/06/2022, 9:25 PMRong R
04/06/2022, 9:25 PMLuis Fernandez
04/06/2022, 9:26 PMRong R
04/06/2022, 9:26 PMLuis Fernandez
04/06/2022, 9:27 PMRong R
04/06/2022, 9:27 PM