function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sean408Sean408 

SOQL Query Help

How would I write this SQL query in SOQL?

 

SELECT t1.name, t1.address, t2.profilename

FROM Table1 t1

INNER JOIN Table2 t2 ON t2.id = t1.id

WHERE t1.city = 'city name'

AmitSahuAmitSahu
Use inner query.. Refer to the soql guide for more information.
Teach_me_howTeach_me_how

SELECT name, address, profilename

FROM Table1 WHERE id IN(SELECT id FROM t2) AND city = 'city name'