Question please
please i hav a question..can uoy answer me??
i have a workers table which contains 4 records such as (id,name,category, status) ...
category like : a,b,c
i want to write query to obtain 3 workers that their status = free and belong to each category (a,b and c )
can you help me ??
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Muhammad ShakirRank #1,217 · 1.5K reputationPosted Jan 8, 2007, 11:06 PM EST
it will show all workers whose status is free and all department of workers will also include.
Muhammad ShakirRank #1,217 · 1.5K reputationPosted Jan 8, 2007, 11:06 PM EST
it will show all workers whose status is free and all department of workers will also include.
Posted Jul 30, 2008, 2:44 AM EDT
select ColumnName1,ColumnName2 from TableName where ColumnName2 in(select top 3 ColumnName2 from test) and Condition=ConditionExperation
Ryan AlfordRank #1,411 · 1.2K reputationPosted Jul 30, 2008, 7:19 AM EDT
ID
, Name
, Category
, Status
FROM WORKERS
WHERE Status = 'Free'
AND Category IN ('a','b','c')
If 'a', 'b', and 'c' are the only possible categories, then you can remove "AND Category IN ('a','b','c')"