Skip to content

Instantly share code, notes, and snippets.

@ssatz
Created April 23, 2022 13:01
Show Gist options
  • Save ssatz/d2e4f6334f47377a0583d2d7b810127b to your computer and use it in GitHub Desktop.
Save ssatz/d2e4f6334f47377a0583d2d7b810127b to your computer and use it in GitHub Desktop.
select `email` as Email,IFNULL(SUBSTRING_INDEX(name,' ',1),"") AS "First Name",IFNULL(SUBSTRING_INDEX(name,' ',-1),"") AS "Last Name", IFNULL(CONCAT("91 ",`mobile`),"") as Phone,IFNULL(`pincode`,"") as Zip ,"IN" as Country from users left join address on address.user_id=users.id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment