Sign in
Log inSign up

Post hidden from Hashnode

Posts can be hidden from Hashnode network for various reasons. Contact the moderators for more details.

How can I write self join in Laravel?

Diamond Ibifa's photo
Diamond Ibifa
·Jun 20, 2017

SELECT u.username AS user, u.referrer AS ref, g.referrer AS gref FROM user u, user g WHERE u.referrer = g.username

UsernameReferrer
JamesJohn
PeterJohn
JohnSarah
MattSarah
SarahJohn
BillJames
PatricFrank