S.Shurane S.Shurane - 1 month ago 7
MySQL Question

How to convert this Microsoft SQL query into a MySQL query?

I used this query to get particular result from a Microsoft SQL Server table, but now I need to convert this query into MySQL query. I don't know how to do that.

SELECT TOP 3 COUNT(Item1) AS ITEM_COUNT,Item1
FROM [cloths_DB].[dbo].[Suggetion_DB]
WHERE [Type] = 'Adidas' and [Age]='25'
GROUP BY Item1
ORDER BY ITEM_COUNT DESC

Answer
SELECT COUNT(Item1) AS ITEM_COUNT,Item1
FROM Suggetion_DB
WHERE Type = 'Adidas'  and Age='25'
GROUP BY Item1
ORDER BY ITEM_COUNT DESC
limit 3