I have a mysql table(trips) with records about cars. I wish to query the data and return one item per carId. But am unable. Below is the query example getting 50 records, which should also have 50 carId
SELECT *
FROM `trips`
WHERE ( carId = 147
OR carId = 62
OR carId = 59
OR carId = 42)
LIMIT 50
Below is an example that returns 8 records. How to return limit 8 records but one record per car. Example here