These are some of the reasons for writing a query:
- To view all of the data in a table.
- To view a subset of the columns in a table.
- To view a subset of the rows in a table.
- To sort the rows of a table.
- To view new columns based on data in existing columns.
- To provide data to be used as the basis of a report, or for processing by some other program.