I am not able to run a SELECT DISTINCT ON() function in Metabase using a native query. I am using a Postgres database. I would like to run the distinct function on only one field, while keeping the remaining fields in the table.
Post "Diagnostic Info" from Admin > Troubleshooting, and which version of Postgres you're querying.
What is preventing you from writing a query like that? Metabase sends the query to Postgres, so if you are getting an error, it's like caused wrong syntax.
Gotcha - so this is an error on the server side (with the syntax) and not Metabase? Apologies for my ignorance here.
I have no idea without the following information:
- Post "Diagnostic Info" from Admin > Troubleshooting
- Which version of Postgres you're querying?
- Post the error you are getting - preferably the full stack trace from Admin > Troubleshooting > Logs