stubbing in mysql with some query sketches