Hi,
I have not come across this syntax before (highlighted in bold):
SELECT t1.*
FROM provider_payments t1
WHERE t1.id = (SELECT MAX(t2.id)FROM provider_payments t2 WHERE t2.account_id = t1.account_id)
Normally after the FROM I would see "tablename1, tablename2" but here I see no comma. I want to learn more about this syntax but because I don't know what it is called, and what it does, I'm having trouble finding more about it on the internet because I don't know what it is called.
The SQL actually does what I want it to do, I just want to learn more about 'what' it's actually doing.
Thank you
James
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.