You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/08/11 19:03:10 UTC

[GitHub] [superset] kevin-struckhoff commented on issue #16164: Support column Order By and multiple Order By clause in Superset

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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org