This Microsoft software is considered today as one of the best options at the time of having to work with databases, and is that it is characterized by offering a lots of tools and functions that allow facilitate work on it, this is how users have the possibility of have the consultation tools.
Queries in Access have as purpose help retrieve data in one table, modify it and store each of the results in another table, where they can also be referred to as the union of resulting rows. Currently they can be found different types of queries in this software, that is why this time there will be a focus on what they are summary queries.
Summary queries often generate results that are of a different nature than the rows of the other tables resulting from queries, so this tool allows apply a multi-row summary from the source table. In accordance with this, and the importance of this type of functions in Access, here we are going to teach you how to perform this procedure of creating a summary query in an easy and fast wayTo do this, follow in detail everything that we will teach you below.
What is a summary query and what are they for in Access?
In the case of Microsoft Access a query is defined as the union of resulting rows which are called as query summary and which are also known as summary inquiries. They can also be referred to as a summary of the query source rows.
When this option is run Access it is very important to understand that the rows of the result of a summary query have a different nature than the rows of the other tables resulting from queries, this is because the result corresponds to multiple rows from source table.
So that you can understand all this a little better, you can assume a case where a query is based on a single table, a row of a query “No summary” corresponds to a source table row, it contains data found in a single row of origin, whereas a row of a summary query belongs to a multi-row summary of source table.
So all this creates a series of constraints that affect the summary queries in Access. In these query types it is not allowed to be able to modify the source data. That is why here we are going to show you an example that allows you understand this better, in this case it is a normal query.
In this data table they can display the rows of a table of offices that are ordered in different regions, where each of the rows of results corresponds to a single row office table, while the second query is a query summary, each row of the result corresponds to one or more rows in the table.
This means that the summary queries are defined by clicking on the option “Totals” in the tab “Design”. In either case, a row is added to the QBE grid, the total row. All columns that are included in the grid must have a color in that row, since it is that value that will tell the software what to do with the values contained in the countryside written in the row of “Countryside”.
Other types of queries What are all the ones that can be created in Access?
It is no secret to anyone that this Microsoft software is one of the most complete tools when working with a database, and is that this program offers all the necessary tools to build and manage any type of data table. This is how it offers various types of queries that allow visualization and manipulation of data in a much simpler way.
To do this, follow each of these types of queries:
Selective query
Selective Queries They are structured query language or also known SQL, it has as its main purpose power retrieve a recordset from a database according to the parameters provided in the selective query.
Parameters that can be used in this function can be very specific like a user ID number or very wide like it would be date ranges. This means that all the values or parameters that match these specifications of the selective query will be returned.
Query attached data
This type of query will allow add a new record to the database table, it is considered as a function that allows include a record that has a number of information fields. The fields it contains register may be required for the append data query, can be all the fields or only some of them.
Cross reference query
This function of cross reference is one of the most used in Microsoft Access, it is in charge of carrying out a calculation on recovered data for later sort the records based on the calculation results that has been run previously.
So that you can understand a little more the function of this query, we give you this example: A A group of people have made a purchase, so all these customers can be recovered and then make the sum of all purchases that they did for a month, all these data could be calculate and sort in descending order.
Delete query
This type of consultation takes care of permanently delete one or more records from the database based in the parameters that have been specified in the consultation. An example of this is that you want to delete all the records of customers who have not bought from a store for a year.
Update query
These types of queries are intended to modify an existing record in the database. An example of this would be when address information is modified within a customer record, this is usually done if the client has moved and requests a change of address. Update queries can include a single record or a set of records.
Union query
Let the records are pulled from two completely different data tables, and which can be classified according to a set of criteria. So that you can understand this better, here is an example:
When a query is made customer list to know which of them the credit card has already expired, the file would require a union query, since in this case the information of the the customer table and also the card information in the credit card table. After that records will be sorted based on a single criterion already defined, in this case it is about knowing what credit cards are already expired.
Queries to create tables
These queries are used to create a table that adds another data table to database. Keep in mind that the tables must have a unique name, unique parent field, and data field set. In addition, each of the rows of data table represents a record different within the database usually.
Parameter queries
It is a predefined select query that offers users a parameter set where you can choose those that suit you best. The parameter queries they are usually created so that retrieving information is much easier.