Find records with upload and Distinct

2 posts by 2 authors in: Forums > CMS Builder
Last Post: June 10, 2015   (RSS)

Hi there,

We'd like to pull a list of records where the client has uploaded an image into an upload-type field. Not all records in the table have an upload. Further, we'd like to pull only a single record from each category type (another field).

Can anyone suggest a query which would pull a random record from each category of product but only select ones which have an image uploaded? Am assuming that a 'groupBy' parameter is involved but I can't seem to make this work in my trials.

Many thanks,

Jayme