Professional Documents
Culture Documents
SOQL Practice
SOQL Practice
SOQL Practice
Write a soql to fetch all the account records in the accending order of account
name
select name,Industry from Account order By Name ASC
Write a soql to fetch all the account records in the decending order of industry
select name,Industry from Account order by Name, Industry DESC
Write a soql to fetch all the records including records which are in recyle bin
from Accoutn sobject
select id,name,Industry from Account ALL ROWS
Write soql query to fetch all the account records whose industry is Banking or
enery or Education.
select name,Industry,Phone from Account where Industry
In('Banking','Energy','Education')
Write a soql query to fetch all the Contact records whose lastname ends with s
select lastname,firstname,phone from Contact where Lastname LIKE '%s'
Write soql to fetch all the opportunity records which are going to closed in next
15 days
select id,name,amount from Opportunity where closeDate=NEXT_N_DAYS:15
SUB QUERIES