I need some assistance with creating a query that will get all the records that correspond to the first 100 orders. For example the table looks something like this:
I know I can use GROUP BY grab the 100 orders but I don't know how I would then get all of the records within each order. I thought of then querying each order but that would exceed the governor limit(and is probably not a good idea anyway.
This code is already live and wasn't supposed to be more than a 100 records a day but just got a batch of over 100 this hour and broke my code... ANY assistance would be greatly appreciated!