Getting only 4 rows per idea from ideas table i have a table of ideas that stores responses from evaluators and stores as one row per evalautor
For ex : Evalautor 1 evaluated idea A then in table record gets added as
IDEA A, COMMENTS , EVALUATOR ID
as single idea have 4 evaluator response and i need to show data in this format
IDEA ID ||. EVALUATOR 1 || EVALUATOR 2|| EVALUATOR 3 || EVALUATOR 4
1 --           Comments --      Comments  --    Comments   --      Comments
Need assistance in creating logic to get information in format given above.
Query i am running :
SELECT * from Toy_ideas GROUP BY evaluator id
but getting results as
Ideaid -- comments -- evaluator id
As the comments mentioned, your question is lacking a lot of details. Specifically what is the criteria / logic you want to use to select 4 rows when idea with id = DC889 has 10 rows, for example?
In any case, this will get you a random set of 4 rows for idea DC889:
SELECT * -- Replace * with only the columns you need, as * is bad practice
FROM IdeaTable
WHERE id = 'DC889'
LIMIT 4;