richard.herbert
05/11/2023, 5:10 PMDISTINCT
with Quick/qbaliaspooryorik
qb.distinct()
I believe @richard.herbert https://github.com/coldbox-modules/qb/blob/7086c9e7a062b2dd02ddb8940b0a9b09c7d7fd27/models/Query/QueryBuilder.cfc#L378garciadev
05/11/2023, 5:26 PMgarciadev
05/11/2023, 5:26 PMquery.select( "username" ).distinct().from( "users" );
aliaspooryorik
richard.herbert
05/11/2023, 5:27 PMaliaspooryorik
richard.herbert
05/11/2023, 5:28 PMgarciadev
05/11/2023, 5:28 PMaliaspooryorik
aliaspooryorik
richard.herbert
05/11/2023, 5:55 PMdistinct
applies to the entire query, not just certain fields.
Humm, not sure this is going to be much help 😞aliaspooryorik
richard.herbert
05/11/2023, 5:57 PMSELECT DISTINCT brand,country,region,area,shopcode,id
FROM shops
ORDER BY brand,country,region,area
aliaspooryorik
aliaspooryorik
qb.select(
["brand","country","region","area","shopcode","id"
]
).distinct()
.from("shops")
.orderBy(["brand","country
","region","area");
aliaspooryorik
aliaspooryorik
richard.herbert
05/11/2023, 5:59 PMraw()
first.richard.herbert
05/11/2023, 6:09 PM