Use WPDB prefix in subquery