Distinct in Read Data

gr grantdigital 30 May, 2018
How would I use the read data to find Distinct values in the database?
​
Example of query below, what I cant work out is how to get to add 'DISTINCT' to the query
SELECT DISTINCT name FROM table
he healyhatman 30 May, 2018
Fields to retrieve:
​
DISTINCT( model.field ):model.alias
​
If that doesn't work for some odd reason, get rid of the brackets.
​
For more complicated queries you need to separate commas and whatnot with spaces and always include the model. For example:
COUNT( DISTINCT if(job.client_id is null , '' , job.client_id) , if(job.client_name is null , '' , job.client_name)):countof.clients
This topic is locked and no more replies can be posted.