Support "distinct on" grammar

postgres=# select distinct on(course)id,name,course,score from student;

It is already supported on postgreSQL, but not worked in dremio.

Hi Colagy,

The grammar itself is not implemented in Dremio, but you can partition data in Dremio, then run SELECT DISTINCT A FROM TABLE – A is partition column. That grammar looks to be specific to PostgresSQL. The way data warehouses generally go about that is by using Window Functions to divide the dataset into partitions, then analyze the partitions. As a select example please see the “Query a table and filter the result using QUALIFY with window functions in the SELECT list” query here.