I have a table defined like this (MySQL 5.1): Sample dataset: I need to show records matching a certain criteria (lets suppose lastname = ‘Santucci’ ) only if the number of records is greater than a certain defined limit (lets say 2). I tried in various way without success the most promising form was: It returns only the first record.