Use the Simple Query Wizard to create a select query combining fields from two related tables. Include these fields in this order: LastName, FirstName, and MedicalInsurance fields from the Staff table and the Premium field from the InsurancePlans table. Include every record in the results. Select the option to open the query to view information. Name the query Insurance and view the query results.
Question
Use the Simple Query Wizard to create a select query combining fields from two related tables. Include these fields in this order: LastName, FirstName, and MedicalInsurance fields from the Staff table and the Premium field from the InsurancePlans table. Include every record in the results. Select the option to open the query to view information. Name the query Insurance and view the query results.
Solution
Here are the steps to create a select query combining fields from two related tables using the Simple Query Wizard in Microsoft Access:
-
Open your Access database and click on the "Create" tab in the Ribbon.
-
In the "Queries" group, click on "Query Wizard". This will open the "New Query" dialog box.
-
In the "New Query" dialog box, select "Simple Query Wizard" and click "OK".
-
In the "Simple Query Wizard" dialog box, you will see a list of tables in your database. Select the "Staff" table.
-
From the "Staff" table, select the "LastName", "FirstName", and "MedicalInsurance" fields by clicking on them and then clicking the ">" button to add them to the "Selected Fields" list.
-
Next, select the "InsurancePlans" table and add the "Premium" field to the "Selected Fields" list in the same way.
-
Click "Next" to proceed. Since you want to include every record in the results, ensure that the "Detail" option is selected and then click "Next" again.
-
In the final step of the wizard, enter "Insurance" as the name of the query.
-
Make sure the "Open the query to view information" option is selected and then click "Finish".
-
The query results will now be displayed, showing the "LastName", "FirstName", and "MedicalInsurance" fields from the "Staff" table and the "Premium" field from the "InsurancePlans" table for every record in the database.
Similar Questions
Using the following schema, write SQL statement to fetch the correct data.Insurance_Company (c_id, c_name, city, state, policy_no, policy_name, premium, cust_id, a_id)Agent (a_id, a_name, address, a_city, a_state, c_name, salary, incentive)Customer (cust_id, name, age, cust_address, cust_city, cust_state, a_id, policy_no)Create tables with Primary Key, foreign key constraints in given schemas.1) Display the details of customer who have taken policy from ‘Ahmedabad Insurance Company’.2) Display agent name who have not sold even a single policy.3) Display the name of Insurance company who has maximum number of customers
Write queries for the following tables:T1 ( Empno, Ename , Salary, Designation)T2 (Empno, Deptno.)(1) Display the Deptno in which Employee Seeta is working.(2) Display Empno, Ename, Deptno.
After you create a query, what must you do in order to see the results? 1. select the table to include in the query 2. select the fields to include in the query 3. run the query 4. enter criterion into the query
Write a query to find employees who have the highest salary in each of the departments.Input format :The input tables are already prepopulated, as given in the problem statement.Output format :The output display the name of each department along with the name of the employee who has the highest salary within that department and their respective salary. Order the output by department name as shown below.Refer to the sample output for the column headers.
Choose the query to display names of the department in the college ordered in department_name in ascending order.select department_name from Department order by department_name asc;select department_name from Department order by name asc;select name from Department order by name;None of the listed optionsReview Answer
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.