I have a large database of businesses which contains various pieces of information about each company (e.g. the number of employees that work there)
Is there a way, using 1 query, of selecting for example
500 companies of between 1 and 5 employees and
300 companies of between 10 and 50 employees
I have been using LIMIT, but as far as I know this will only let me do the above as 2 seperate queries.
ALSO is it possible to append a flag to the SELECTed records (e.g. those records that have between 1 and 5 should have an extra field added on containing '1 to 5' and the 10 to 50 employee records should also be appropriately flagged).
Any help on either part would be much appreciated as current method is very laborious esp. when there are dozens of cells.
Is there a way, using 1 query, of selecting for example
500 companies of between 1 and 5 employees and
300 companies of between 10 and 50 employees
I have been using LIMIT, but as far as I know this will only let me do the above as 2 seperate queries.
ALSO is it possible to append a flag to the SELECTed records (e.g. those records that have between 1 and 5 should have an extra field added on containing '1 to 5' and the 10 to 50 employee records should also be appropriately flagged).
Any help on either part would be much appreciated as current method is very laborious esp. when there are dozens of cells.