Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real Postgres "DISTINCT ON" query... #1110

Open
Foddy opened this issue Jan 22, 2024 · 1 comment
Open

Real Postgres "DISTINCT ON" query... #1110

Foddy opened this issue Jan 22, 2024 · 1 comment

Comments

@Foddy
Copy link

Foddy commented Jan 22, 2024

Hi,

does anyone know how I can make this query using Medoo's select function? I hope I can avoid using the raw query method:

SELECT DISTINCT ON (guests."group") *
FROM guests

I'm unfortunately not making progress with the distinct function in the documentation. The results are completely different. My goal is to only retrieve the first entry when multiple rows have the same group ID.

@Foddy
Copy link
Author

Foddy commented Jan 28, 2024

No one... 😮‍💨?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant