User`s guide
5 Using Visual Query Builder
5-34
Fine-Tuning Queries Using Advanced Query Options
In this section...
“Retrieving All Occurrences vs. Unique Occurrences of Data” on page 5-34
“Retrieving Data That Meets Specified Criteria” on page 5-35
“Grouping Statements” on page 5-38
“Displaying Results in a Specified Order” on page 5-42
“Using Having Clauses to Refine Group by Results” on page 5-45
“Creating Subqueries for Values from Multiple Tables” on page 5-48
“Creating Queries That Include Results from Multiple Tables” on page 5-52
“Additional Advanced Query Options” on page 5-54
Note: For details about advanced query options, select Help in any of the dialog boxes for
the options.
Retrieving All Occurrences vs. Unique Occurrences of Data
To use the dbtoolboxdemo data source to demonstrate how to retrieve all versus
distinct occurrences of data:
1
Set the Data return format preference to cellarray.
2
Set Read NULL numbers as to NaN.
3
In Data operation, choose Select.
4
In Data source, select dbtoolboxdemo.
Do not specify Catalog or Schema.
5
In Tables, select SalesVolume.
6
In Fields, select January.
7
To retrieve all occurrences of January:
a
In Advanced query options, select All.
b
Assign the query results to the MATLAB workspace variable All.
c
Click Execute to run the query.