query for mysql and oracle