I'm in the process of creating a table and it made me wonder.
If I store, say cars that has a make (fx BMW, Audi ect.), will it make any difference on the query speed if I store the make …
Does anyone an idea how to rewrite following SQL query to generate results, that would contains only one occurrence of name? (results grouped by user).
The query
SELECT array_to_string(array_agg(CONCAT(u.firstname, ' ', u.lastname)), …
I want to select a date (my column is a timestamp type). But when in column is a NULL date, I want to return an empty string. How to do this? I wrote this:
SELECT
CASE WHEN to_char(last_…