I make a query to the database: SELECT DISTINCT MODEL FROM advert WHERE COMPLETE = 1 The list of models from the ad table is displayed, without repetitions. And how in the same request to specify the output of the number of ads in which these models? Example:
Model1 = 232 ads
Model2 = 112 ads
Model3 = 31 listings