|
|
|
|
|
by maximilianroos
503 days ago
|
|
SQL is terrible at allowing this sort of transformation. One benefit of PRQL [disclaimer: maintainer] is that it's simple to add additional logic — just add a line filtering the result: from users
derive [full_name = name || ' ' || surname]
filter id == 42 # conditionally added only if needed
filter username == param # again, only if the param is present
take 50
|
|
I usually use knex or EF or such where ordering doesn't matter; it's a joy however, I prefer writing queries directly as it's easier.