Avatar of James Froggatt
James FroggattFlag for France

asked on 

What does the following MYSQL syntax do, and mean?

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
SQL

Avatar of undefined
Last Comment
slightwv (䄆 Netminder)
ASKER CERTIFIED SOLUTION
Avatar of Bembi
Bembi
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

I fail to see how Bembi's post answered the question asked.
SQL
SQL

SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.

61K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo