kevin-struckhoff commented on issue #16164:
URL: https://github.com/apache/superset/issues/16164#issuecomment-897075812
This is a huge problem for me, in fact I've never written a query that sorts
by a metric. Additionally, you need to support non-selected columns in an order
by clause. For example, this query below won't work right now because the
day_of_week_ord column is not in the select clause:
SELECT day_of_week_short AS day_of_week_short,
AVG(avg_calories) AS "AVG(avg_calories)"
FROM public.calories_wk_agg
GROUP BY day_of_week_ord,
day_of_week_short
ORDER BY day_of_week_ord ASC;
This sql works fine in Postgres and probably most other db's.
BTW, when I do add the day_of_week_ord column to the superset query and set
the sort by to just day_of_week_ord, it doesn't sort correctly. I'll open a new
bug report for that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]