Meta interview question

use sql to do filtering