Professional Documents
Culture Documents
From Hariharan B To All Attendees: 12:28 PM
From Hariharan B To All Attendees: 12:28 PM
From Hariharan B To All Attendees: 12:28 PM
com
Hariharan - hariharan19105@gmail.com
preethamkumari391@gmail.com
adityamondal17@gmail.com
preethamkumari391@gmail.com
_____________________________________________
_____________________________________________
______________________________
4) Group By - Having Query On Standard Objects :-
1) Account Object :-
1) Select Count(Id) , Name From Account group by
Name having Count(Id)=1
2)Select Count(Id), Name From Account group by
Name having Name ='Rohit'
_____________________________________________
_____________________________________________
________________________
5) Limit Quey On standard Object :-
1)Select Id, Name From Account Where Phone = '(915)
859-3880' limit 1
_____________________________________________
_____________________________________________
____________
6)Offset Query On Standard Object :-
1)Select Id, Name From Account Where Phone = '(915)
859-3880' offset 1
_____________________________________________
_____________________________________________
_______________
7)Limit with Offset on Standard Object :-
1)Select Id, Name From Account Where Phone = '(915)
859-3880' limit 1 offset 1
_____________________________________________
_____________________________________________
_____________________________________________
__
8)ORDER BY Quey on Standard Object :-
a)Parent to child query way :-
1)Select Id, Name ,(Select Id, Name From Contacts)
From Account ORDER BY Name Asc // Account to
Contact not possoible gives error query
2)Select Id, Name ,(Select Id, Name From Contacts)
From Account ORDER BY Id ASC
3)Select Id, Name ,(Select Id, Name From Contacts)
From Account limit 1 offset 1 ORDER BY Name DESC
c) Normal way
5)Select Id, Name From Contact ORDER BY Id Desc
6)Select Id, Name From Contact ORDER BY Name Asc
7)Select Id, Name From Account ORDER BY Id Desc
8)Select Id, Name From Account ORDER BY Name Asc
==========================================
==========================================
==========================================
==========================================
================
++++++++++++++++++++++++++++++++++++++++++
+++++++++++++ 2) All Query on Opportunitie object ++
++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++
_____________________________________________
_____________________________________________
_________________
2)Child To Parent Query :- *Child - Opportunitie , *Parent
- Accounts ( Accounts Lookup Opportunitie/Opportunity )
Query :- Select Id, Name , Account.Id , Account.Name
From Opportunity
_____________________________________________
_____________________________________________
_________
3) Where Clause Query On Standard Object:-
1)Standard Object
1)Opportunities Object :-
1)Select Id, Name From Opportunity Where
StageName = 'Qualification'
2)Select Id, Name From Opportunity Where Type =
'Existing Customer - Upgrade'
_____________________________________________
_____________________________________________
______________________________
4) Group By - Having Query On Standard Objects :-
1) Opportunitie Object :-
1) Select Count(Id) , Name From Opportunity group by
Name having Count(Id)=1
2)Select Count(Id), Name From Opportunity group by
Name having Name ='Megha'
_____________________________________________
_____________________________________________
________________________
5) Limit Quey On standard Object :-
1)Select Id, Name From Opprtunity Where StageName
= 'Qalification' limit 1
_____________________________________________
_____________________________________________
____________
6)Offset Query On Standard Object :-
1)Select Id, Name From Opportuniy Where StageName
= 'Qalification' offset 1
_____________________________________________
_____________________________________________
_______________
7)Limit with Offset on Standard Object :-
1)Select Id, Name From Opportunity Where
StageName = 'Qalification' limit 1 offset 1
_____________________________________________
_____________________________________________
_____________________________________________
__
8)ORDER BY Quey on Standard Object :-
1)Select Id, Name From Opportunity ORDER BY Name
Asc
2)Select Id, Name From Opportunity ORDER BY Id Asc
==========================================
==========================================
==========================================
============================
++++++++++++++++++++++++++++++++++++++++++
+++++++++++++3) All Query on Opportunity object +++
++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++
_____________________________________________
_____________________________________________
_________
3) Where Clause Query On Standard Object:-
1)Standard Object
1)Opportunities Object :-
1)Select Id, Name From Opportunity Where
StageName = 'Qalification'
_____________________________________________
_____________________________________________
______________________________
4) Group By - Having Query On Standard Objects :-
1) Opportunitie Object :-
1) Select Count(Id) , Name From Opportunity group by
Name having Count(Id)=1
2)Select Count(Id), Name From Opportunity group by
Name having Name ='Megha'
_____________________________________________
_____________________________________________
________________________
5) Limit Quey On standard Object :-
1)Select Id, Name From Opprtunity Where
StageName = 'Qalification' limit 1
_____________________________________________
_____________________________________________
____________
6)Offset Query On Standard Object :-
1)Select Id, Name From Opportunity Where
StageName = 'Qalification' offset 1
_____________________________________________
_____________________________________________
_______________
7)Limit with Offset on Standard Object :-
1)Select Id, Name From Opportunity Where
StageName = 'Qalification' limit 1 offset 1
_____________________________________________
_____________________________________________
_____________________________________________
__
8)ORDER BY Quey on Standard Object :-
a)Query of Parent to child on apply:-
1)Select Id, Name ,(Select Id, Name From
Opportunities) From Contact ORDER BY Name Asc
2)Select Id, Name ,(Select Id, Name From
Opportunities) From Contact ORDER BY Id Asc
==========================================
==========================================
==========================================
====================================
++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++4) All Query On Assests Object
++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++
_____________________________________________
_____________________________________________
______________________________
4) Group By - Having Query On Standard Objects :-
1) Asset Object :-
1) Select Count(Id) , Name From Asset group by Name
having Count(Id)=1
2)Select Count(Id), Name From Asset group by Name
having Name ='Sauravi Khamankar'
_____________________________________________
_____________________________________________
________________________
5) Limit Quey On standard Object :-
1)Select Id, Name From Asset Where Status =
'Installed' limit 1
_____________________________________________
_____________________________________________
____________
6)Offset Query On Standard Object :-
1)Select Id, Name , Account.Id , Account.Name From
Asset offset 2
_____________________________________________
_____________________________________________
_______________
7)Limit with Offset on Standard Object :-
1)Select Id, Name ,(Select Id, Name From Assets) From
Account limit 1 offset 10
_____________________________________________
_____________________________________________
_____________________________________________
__
8)ORDER BY Quey on Standard Object :-
b)Normal way:-
1)Select Id, Name From Asset ORDER BY Name Asc
3)Select Id, Name From Asset ORDER BY Id Asc
==========================================
==========================================
==========================================
====================
++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++5) All Query On Assests Object
++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++
_____________________________________________
_____________________________________________
______________________________
4) Group By - Having Query On Standard Objects :-
1) Asset Object :-
1) Select Count(Id) , Name From Asset group by Name
having Count(Id)=1
2)Select Count(Id), Name From Asset group by Name
having Name ='Sauravi Khamankar'
++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++
Lead Standard Object
_____________________________________________
_____________________________________________
________________________
5) Limit Quey On standard Object :-
1)Select Id, Name From Asset Where Status =
'Installed' limit 1
_____________________________________________
_____________________________________________
____________
6)Offset Query On Standard Object :-
1)Select Id, Name , Account.Id , Account.Name From
Asset offset 2
_____________________________________________
_____________________________________________
_______________
7)Limit with Offset on Standard Object :-
1)Select Id, Name ,(Select Id, Name From Assets) From
Account limit 1 offset 10
_____________________________________________
_____________________________________________
_____________________________________________
__
8)ORDER BY Quey on Standard Object :-
c)Parent to child query way :-
1)Select Id, Name ,(Select Id, Name From Assets) From
Contact ORDER BY Name Asc
2)Select Id, Name ,(Select Id, Name From Assets) From
Contact ORDER BY Id Asc
==========================================
==========================================
==========================================
==============================
++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++6)All Custom Object Query All
Types Condition is Satisfied+++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
_____________________________________________
_____________________________________________
____________
6)Offset Query On Custom Object :-
1)Select Id, Name , Police__c.Id , Police__c.Name From
FIR__c offset 2 //error
_____________________________________________
_____________________________________________
_______________
7)Limit with Offset on Standard Object :-
1)Select Id, Name ,(Select Id, Name From FIRs__r)
From Police__c limit 1 offset 2
_____________________________________________
_____________________________________________
_____________________________________________
__
8)ORDER BY Quey on Standard Object :-
c)Parent to child query way :-
1)Select Id, Name ,(Select Id, Name From FIRs__r)
From Police__c ORDER BY Name Asc
2)Select Id, Name ,(Select Id, Name From FIRs__r)
From Police__c ORDER BY Id Asc
==========================================
==========================================
==========================================
==================
++++++++++++++++++++++++++++++++++++++++++
+++++++++++ All Standard And Custom objects of on
'Includes' method +++++++++++++++++++++++++++++
+++++++++++++++++
Standard object :- INCLUDES means ki ye value jisme
hogi vo Record
1) Select Id , Education__c From Account Where
Education__c INCLUDES('B.E' ,'M.Tech')
2)Select Id, Education__c From Account Where
Education__c EXCLUDES('B.E','M.Tech')
==========================================
==========================================
==========================================
==========================
++++++++++++++++++++++++++++++++++++++++++
+++++++++All Standard Object and Custom Object++++
++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++
In SOSL Query for find query we can use to using
where clause like '*c'
==========================================
==========================================
===================
++++++++++++++++++++++++++++++++++++++++++
++++++++++++ Standard and Custom Object++++++++
+++++++++++++++++++++++++++++++
==========================================
==========================================
====================
1)https://www.salesforcetutorial.com/soql-logical-
operators-and-or/
++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++
+++++++++
++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++
++
List<String> child_address_list = new List<String>();
child_address_list.add(objList.Id);
}
for(childAddress__c oldobj : trigger.old){
if(parent_list.contains(oldobj.Parent__c)){
delete oldobj;
}
}
if(trigger.isAfter){