I need to fetch 4 random values from each category. What should be the correct sql syntax for maria db. I have attached one image of table structure.
Please click here to check the structure
Should i write some procedure or i can do it with basic sql syntax?
SELECT column FROM table WHERE category_id = XXX ORDER BY RAND() LIMIT 4
do it for all categories