A mock of some sample data in the table would help (i.e. what is available to identify rows, what is the column we're using to pick first 2 samples from, and when there's more than 2 rows in a set, how would we know which 2 are the 'first', based on what ordering factor?).
Ultimately though if your DBMS permits it (provide the vendor name and version of your DBMS too), then analytics are probably what you want.
Something like this if it's a relatively recent Oracle/MSSQL backend:
select * from
(
select row_number()
over (partition by the_sample_column order by the_order_column) as row_num,
*
from your_table
) q
where q.row_num <= 2
If it's MySQL though, completely different kettle of fish.