Skip to content

Instantly share code, notes, and snippets.

@mohashari
Last active September 8, 2019 03:55
Show Gist options
  • Select an option

  • Save mohashari/d10200844a7d68a09fc396f6a9e1aab3 to your computer and use it in GitHub Desktop.

Select an option

Save mohashari/d10200844a7d68a09fc396f6a9e1aab3 to your computer and use it in GitHub Desktop.
##custom query berdasarkan level3
SELECT l1.name , l2.name , l3.name FROM Category AS l3
LEFT JOIN Category AS l2 ON l3.parent = l2.secureId
LEFT JOIN Category AS l1 ON l2.parent = l1.secureId
WHERE l3.secureId = {{secureId}}
##custom query berdasarkan level 2
SELECT l1.name , l2.name FROM Category AS l2
LEFT JOIN Category AS l1 ON l2.parent = l1.secureId
WHERE l2.secureId = {{secureId}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment