I have a query which returns all unique values from a table.
“punches” table:
SELECT DISTINCT user_id FROM punches WHERE organisation_id = ‘$current_organisation_id’;
This will list of user_id’s.
I also need to get the result of “name” of each user, that is stored in “user” table and also has “user_id” as primary key.
Many Thanks
I could get this results with two different SQL queries, but I know it is possible to do in one query.