SPQuery query = new SPQuery();
SPSiteDataQuery – It allows you to query from multiple lists whether it can be from a single-site or from that site and from sub sites.
SPSiteDataQuery query = new SPSiteDataQuery();
Both SPQuery and SPSiteDataQuery have Query property which accepts CAML query text.
For SPSiteDataQuery you may specify a scope. SPSiteDataQuery object has a property “Webs“
which defines the scope.
This property is described as “It specifies which web sites to include in the query as specified the scope attribute on the Webs tag in the query. By default, the query considers the current web site.”
Like SPQuery you may put Row Limit in SPSiteDataQuery.
To know more about CAML Query, please visit my another blog post Learn CAML Query step by Step