SELECT u.id AS student_id, u.firstname AS student_firstname, u.lastname AS student_lastname, u.phone AS student_phone, parent_user.id AS parent_id, parent_user.firstname AS parent_firstname, parent_user.lastname AS parent_lastname, parent_user.phone AS parent_phone, parent_profile.country AS parent_country, p.status AS relationship_status, u.created_at AS student_signup_unix FROM user u INNER JOIN parents p ON p.student_id = u.id INNER JOIN user parent_user ON parent_user.id = p.parent_id INNER JOIN user_profile parent_profile ON parent_profile.user_id = p.parent_id WHERE u.type = 'student' AND u.created_at BETWEEN 1748818800 AND 1750460400 AND ( ( NOT ( parent_user.phone LIKE '234%' OR parent_user.phone LIKE '080%' OR parent_user.phone LIKE '081%' OR parent_user.phone LIKE '070%' OR parent_user.phone LIKE '090%' OR parent_user.phone LIKE '091%' ) ) AND ( LOWER(parent_profile.country) NOT IN ('nigeria') OR parent_profile.country IS NULL ) );
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter