yes – you use the WHERE clause(“SELECT .. FROM … WHERE …”)
examples:
… WHERE `thename` like 'gas%' …
… WHERE `thedate` = '2006-01-05' …
… WHERE `thetime` >= '2006-01-05 12:00:00' …
… WHERE `theuser` IS NOT NULL …
… WHERE `theuser` IS NOT NULL and `thename` like 'gas%' and `thetime` >= '2006-01-05 12:00:00' …
Also use the LIMIT clause to retun only a limited number of rows.