{"id":3151,"date":"2019-12-23T16:46:03","date_gmt":"2019-12-23T16:46:03","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/?post_type=chapter&#038;p=3151"},"modified":"2025-10-30T15:49:35","modified_gmt":"2025-10-30T15:49:35","slug":"what-are-queries","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/chapter\/what-are-queries\/","title":{"raw":"What Are Queries?","rendered":"What Are Queries?"},"content":{"raw":"<div class=\"textbox learning-objectives\">\r\n<h3>Learning Outcomes<\/h3>\r\n<ul>\r\n \t<li>Define queries in Microsoft Access<\/li>\r\n \t<li>Create a query<\/li>\r\n<\/ul>\r\n<\/div>\r\nHaving a database full of information is great, but it does not do the business any good if it cannot be used to make decisions. The ability to extract information from a database so that it is useful for decision-making starts with the \u201cquery.\u201d Simply speaking, a query is a question being asked of the data to inform the business.\r\n\r\nA query of a database like Access gives you the ability to bring data together in a coherent manner, whether it resides in one or multiple tables. The query is the heart of \u201cBusiness Intelligence\u201d (BI) and the foundation of the Search. For example, a business may wish to know where the sales of its new product are occurring by zip code; or, who the top 5 suppliers to the business are.\r\n<div class=\"textbox tryit\">\r\n<h3>Practice Question<\/h3>\r\nhttps:\/\/assess.lumenlearning.com\/practice\/be3180b5-8e89-4f10-8682-03cd6c235a64\r\n\r\n<\/div>\r\n<h2>Create a Query<\/h2>\r\nAccess provides query capability in the form of wizards to help create the query. To create a query, select \u201cCreate\u201d from the tool bar and then \u201cQuery Wizard.\u201d This will open the \u201cNew Query\u201d window where you can choose among 4 wizards.\r\n\r\n<img class=\"alignnone wp-image-3487 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07231931\/Figure14_8.png\" alt=\"Create has been selected in the toolbar and the New Query window has popped up revealing four options: Simple Query Wizard, Crosstab Query Wizard, Find Duplicates Query Wizard, and Find Unmatched Query Wizard. \" width=\"974\" height=\"504\" \/>\r\n\r\nIn our example, choose \u201cSimple Query Wizard.\u201d This wizard gives the option of choosing the table and the field for the query.\r\n\r\n<img class=\"alignnone wp-image-3489 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07232009\/Figure14_9.png\" alt=\"Simple Query Wizard window open showing the following items: Text that reads &quot;Which fields do you want in your query? You can choose from more than one table or query.&quot; A drop down menu with the label &quot;Tables\/Queries&quot; and &quot;Table: Customers&quot; selected in that dropdown menu. Two additional boxes labeled Available Fields and Selected Fields. There are a series of buttons positioned between Avalible Fields and Selected fields that allow the user to move fields in and out of &quot;Selected Fields&quot;. &quot;ID&quot; is selected in Available Fields and no fields have been moved to the Selected Fields.\" width=\"731\" height=\"570\" \/>\r\n\r\nLet\u2019s say that we are interested in knowing the status of Purchase Orders. Since this data is distributed across 2 tables, a query is the ideal way to gather this information. For this query we will need to select the \u201cPurchase Order\u201d table and several fields contained there as the example below.\r\n\r\n<img class=\"alignnone wp-image-3490 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07232033\/Figure14_10.png\" alt=\"Simple Query Wizard window. In the Tables\/Queries dropdown menu, &quot;Table: Purchase Orders&quot; is selected. &quot;Selected Fields&quot; include Purchase Order ID, Supplier ID, Status ID, and Submitted By.\" width=\"700\" height=\"529\" \/>\r\n\r\nWe then need to add data from the \u201cPurchase Orders Status\u201d table, so we select that and the \u201cStatus\u201d field as in the example below.\r\n\r\n<img class=\"alignnone wp-image-3491 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07232046\/Figure14_11.png\" alt=\"Simple Query Wizard window open showing identical information to the previous image but with the field &quot;Status&quot; in the Selected Fields box.\" width=\"708\" height=\"529\" \/>\r\n\r\nThe completed query brings together the information we requested in datasheet format and from here can be sorted, edited, resized or otherwise revised.\r\n\r\n<img class=\"alignnone wp-image-3492 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07233645\/Figure14_12.png\" alt=\"Complete query presents information in the form of a datasheet. The datasheet shown here includes the following information: Purchase Order ID, Supplier ID, Status ID, Submitted By, and Status.\" width=\"839\" height=\"581\" \/>\r\n<div class=\"textbox tryit\">\r\n<h3>PRactice Question<\/h3>\r\nhttps:\/\/assess.lumenlearning.com\/practice\/1ead7ad3-c3be-4843-b313-aa6625c7b36f\r\n\r\n<\/div>","rendered":"<div class=\"textbox learning-objectives\">\n<h3>Learning Outcomes<\/h3>\n<ul>\n<li>Define queries in Microsoft Access<\/li>\n<li>Create a query<\/li>\n<\/ul>\n<\/div>\n<p>Having a database full of information is great, but it does not do the business any good if it cannot be used to make decisions. The ability to extract information from a database so that it is useful for decision-making starts with the \u201cquery.\u201d Simply speaking, a query is a question being asked of the data to inform the business.<\/p>\n<p>A query of a database like Access gives you the ability to bring data together in a coherent manner, whether it resides in one or multiple tables. The query is the heart of \u201cBusiness Intelligence\u201d (BI) and the foundation of the Search. For example, a business may wish to know where the sales of its new product are occurring by zip code; or, who the top 5 suppliers to the business are.<\/p>\n<div class=\"textbox tryit\">\n<h3>Practice Question<\/h3>\n<p>\t<iframe id=\"assessment_practice_be3180b5-8e89-4f10-8682-03cd6c235a64\" class=\"resizable\" src=\"https:\/\/assess.lumenlearning.com\/practice\/be3180b5-8e89-4f10-8682-03cd6c235a64?iframe_resize_id=assessment_practice_id_be3180b5-8e89-4f10-8682-03cd6c235a64\" frameborder=\"0\" style=\"border:none;width:100%;height:100%;min-height:300px;\"><br \/>\n\t<\/iframe><\/p>\n<\/div>\n<h2>Create a Query<\/h2>\n<p>Access provides query capability in the form of wizards to help create the query. To create a query, select \u201cCreate\u201d from the tool bar and then \u201cQuery Wizard.\u201d This will open the \u201cNew Query\u201d window where you can choose among 4 wizards.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3487 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07231931\/Figure14_8.png\" alt=\"Create has been selected in the toolbar and the New Query window has popped up revealing four options: Simple Query Wizard, Crosstab Query Wizard, Find Duplicates Query Wizard, and Find Unmatched Query Wizard.\" width=\"974\" height=\"504\" \/><\/p>\n<p>In our example, choose \u201cSimple Query Wizard.\u201d This wizard gives the option of choosing the table and the field for the query.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3489 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07232009\/Figure14_9.png\" alt=\"Simple Query Wizard window open showing the following items: Text that reads &quot;Which fields do you want in your query? You can choose from more than one table or query.&quot; A drop down menu with the label &quot;Tables\/Queries&quot; and &quot;Table: Customers&quot; selected in that dropdown menu. Two additional boxes labeled Available Fields and Selected Fields. There are a series of buttons positioned between Avalible Fields and Selected fields that allow the user to move fields in and out of &quot;Selected Fields&quot;. &quot;ID&quot; is selected in Available Fields and no fields have been moved to the Selected Fields.\" width=\"731\" height=\"570\" \/><\/p>\n<p>Let\u2019s say that we are interested in knowing the status of Purchase Orders. Since this data is distributed across 2 tables, a query is the ideal way to gather this information. For this query we will need to select the \u201cPurchase Order\u201d table and several fields contained there as the example below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3490 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07232033\/Figure14_10.png\" alt=\"Simple Query Wizard window. In the Tables\/Queries dropdown menu, &quot;Table: Purchase Orders&quot; is selected. &quot;Selected Fields&quot; include Purchase Order ID, Supplier ID, Status ID, and Submitted By.\" width=\"700\" height=\"529\" \/><\/p>\n<p>We then need to add data from the \u201cPurchase Orders Status\u201d table, so we select that and the \u201cStatus\u201d field as in the example below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3491 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07232046\/Figure14_11.png\" alt=\"Simple Query Wizard window open showing identical information to the previous image but with the field &quot;Status&quot; in the Selected Fields box.\" width=\"708\" height=\"529\" \/><\/p>\n<p>The completed query brings together the information we requested in datasheet format and from here can be sorted, edited, resized or otherwise revised.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3492 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3008\/2019\/12\/07233645\/Figure14_12.png\" alt=\"Complete query presents information in the form of a datasheet. The datasheet shown here includes the following information: Purchase Order ID, Supplier ID, Status ID, Submitted By, and Status.\" width=\"839\" height=\"581\" \/><\/p>\n<div class=\"textbox tryit\">\n<h3>PRactice Question<\/h3>\n<p>\t<iframe id=\"assessment_practice_1ead7ad3-c3be-4843-b313-aa6625c7b36f\" class=\"resizable\" src=\"https:\/\/assess.lumenlearning.com\/practice\/1ead7ad3-c3be-4843-b313-aa6625c7b36f?iframe_resize_id=assessment_practice_id_1ead7ad3-c3be-4843-b313-aa6625c7b36f\" frameborder=\"0\" style=\"border:none;width:100%;height:100%;min-height:300px;\"><br \/>\n\t<\/iframe><\/p>\n<\/div>\n\n\t\t\t <section class=\"citations-section\" role=\"contentinfo\">\n\t\t\t <h3>Candela Citations<\/h3>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <div id=\"citation-list-3151\">\n\t\t\t\t\t\t\t <div class=\"licensing\"><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Original<\/div><ul class=\"citation-list\"><li>What Are Queries?. <strong>Authored by<\/strong>: Robert Danielson. <strong>Provided by<\/strong>: Lumen Learning. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><\/ul><\/div>\n\t\t\t\t\t\t <\/div>\n\t\t\t\t\t <\/div>\n\t\t\t <\/section>","protected":false},"author":17,"menu_order":6,"template":"","meta":{"_candela_citation":"[{\"type\":\"original\",\"description\":\"What Are Queries?\",\"author\":\"Robert Danielson\",\"organization\":\"Lumen Learning\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"}]","CANDELA_OUTCOMES_GUID":"7ad60111-c7c6-469a-915a-ae45ba761d3d, ae734ded-90fe-4d93-82e0-cea004eb19ae, bff3643f-dc8f-4cf7-8163-4f2355e42b65","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-3151","chapter","type-chapter","status-publish","hentry"],"part":2775,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/pressbooks\/v2\/chapters\/3151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/wp\/v2\/users\/17"}],"version-history":[{"count":11,"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/pressbooks\/v2\/chapters\/3151\/revisions"}],"predecessor-version":[{"id":5590,"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/pressbooks\/v2\/chapters\/3151\/revisions\/5590"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/pressbooks\/v2\/parts\/2775"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/pressbooks\/v2\/chapters\/3151\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/wp\/v2\/media?parent=3151"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/pressbooks\/v2\/chapter-type?post=3151"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/wp\/v2\/contributor?post=3151"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/wm-computerapplicationsmgrs\/wp-json\/wp\/v2\/license?post=3151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}