List all vendors with their address(city, state,zipcode) for all the vendors who have credited account (credit total>0)) Hint:Vendors & Invoices tables with credit total column WHERE vendors.vendor id = invoices.vendor id AND CREDIT_TOTAL>0;
Q: For each order, list the order ID, customer ID, order date, and most recent date among all orders.…
A: Given data For each order, list the order ID, customer ID, order date, and most recent date among…
Q: Display the maximum price of all the products in PRODUCTS table for each Supplier ID having a…
A: Here we need to join Table Supplier and PID. Since they have common attribute,they can be joined…
Q: Please answer briefly: Write an SQL query to fetch the EmpId and FullName of all the employees…
A: The question has been answered in step2
Q: Creating a table with following information: Name of table: Worker, columns and data types:…
A: The CREATE TABLE statement is used to create a new table in a database.
Q: Based on the ERD below, display the assignment number, employee number and assigned hours for either…
A: Here we are joining three tables ASSIGNMENT, EMPLOYEE, and JOB and the assigned job is either 501 or…
Q: Delete the EndDate column from the EMPLOYEES table.
A: Deleting column: The Structured Query Language (SQL) alter statement is used when there is a need…
Q: For every order that has been received, display the order ID, the total dollar amount owed on that…
A: For every order that has been received, display the order ID, the total dollar amount owed on that…
Q: Display employees where the first name or last name starts with S. using sql plus hr user
A: To select data from a database, SELECT statement are used. The data is saved in a result table…
Q: CUSTOMER aus CODE CUS LNAME CUS FNAME CuS INITIAL CUS AREACODE CuS PHONE CUS BALANCE PRODUCT P cODE…
A: SQL (Structured Query Language) is a database query language. According to ANSI, it is the…
Q: List the LastName, FirstName, and the total number of orders placed by each customer (as OrderCount)…
A: SQL is a structured query language, that's designed to facilitate the extraction the specific…
Q: List the vendor names and address(city, state,zipcode), invoice total for all the vendors who have…
A: There are 2 table which will be joined by outer join. One table contains vendor name,…
Q: Using the university schema, write an SQL query to find the names and IDs of those instructors who…
A: Given: Using the university schema, write an SQL query to find the names and IDs of those…
Q: normal form of this relational table? 1AKE, MODEL,YEAR, OWNER)
A: relation table gives relationship between entities and their attributes.
Q: List student names and total reservations for all students whose have reservad a book more then one…
A: SQL Query: select s.sname and count(r.sid) from student as s, reservation as r, book as b where…
Q: PRODUCTS PID DESC PRICE SID QTY 801 Pencil 3 1 10 802 A4 6 2 15 803 Ballpen 4 2…
A: GIVEN: PRODUCTS PID DESC PRICE SID QTY 801 Pencil 3 1 10 802 A4 6…
Q: See the following table CREATE TABLE product ( product_id NUMBER(3), product_name VARCHAR(30) NOT…
A:
Q: select first name of customer and the highest total in invoice in sql
A: The highest of any column can be obtained by using max operator select is used to display the data
Q: Write a query to display first name, last name, package number and internet speed for all customers…
A: We need to write a query to display the first name, last name, package number, and internet speed…
Q: Write a query to display the manager name, department name, department phone number, employee name,…
A: Write a query to display the manager name, department name, department phone number, employee name,…
Q: i. Insert all rows from Product table into Parts table by using subquery. ii. Find the average of…
A: SELECT query will fetch the result and the same will be inserted to another table using INSERT query…
Q: Where OID refers to Owner's ID, OLname and OFname refers to the last and first name of customers,…
A: Tables are database objects that contain all the data in a database. In tables, data is logically…
Q: Write the SQL code that will list only the distinct project numbers in the ASSIGNMENT table, sorted…
A: DISTINCT is the keyword used to get the distinct items from the Table related to the column used…
Q: Using the data in the ASSIGNMENT table, write the SQL code that will yield the total number of hours…
A: Please check the step 2 for required sql code
Q: Using SQL Show the distinct location_id for all the locations where the company has departments
A: SQL SQL stands for Structured Query Language, and it is a programming language used to store,…
Q: Answer the query using SQL. For each department which has more than 5 female employees, retrieve the…
A: In the following Query we will retrieve three things: The department name The number of female…
Q: Answer the query using SQL. For each department that controls more than 3 projects, retrieve the…
A: Introduction of DBMS: A database is a collection of data that are used to produce useful information…
Q: Write the SQL code that will list only the distinct project numbers in the ASSIGNMENT table, sorted…
A: To solve the question - Step 1: Let us first create a table named "ASSIGNMENT" with columns as…
Q: Given the following table TABLE CUSTOMER Column Null? Туре CUS_ID NOT NULL NUMBER NAME VARCHAR2(50)…
A: In SQL, the SELECT statement can be applied to fetch records from any relation. It can display…
Q: List the owner number and last name for all owners located in the city of Seattle. Your query should…
A: Actually, database is a used to stores data\information.
Q: Using the data in the ASSIGNMENT table, write the SQL code that will yield the total number of hours…
A: Here Table Name is ASSIGNMENT and corresponding attributes need to find are EMP_NUM , EMP_LNAME,…
Q: What will be the field size for the ProductLineName field in the Product table? Why?
A: The field size is 40.
Q: List the product ID from the highest selling product in France (Inner join ) Write a query to…
A: We need to write queries for given scenarios.
Q: SELECT distinct ID, name FROM student WHERE ID (SELECT ID FROM takes WHERE year < 2017); A
A: Given: Using the university schema, fill in the blank to complete the SQL query that finds the ID…
Q: List the names of all customers that have a credit limit of $7,500 or less
A: Below is the answer to above question. I hope this will be helpful for you...
Q: Display the state of customers, the total and the average purchase amounts of each state in 2017…
A: Solution is in Step 2.
Q: SQL DATABASE need the SQL statements ATTACHED tables 3. List the reservation ID, trip…
A: Dear student, as per guideline I'm supposed to answer first three sub-parts in an order, i request…
Q: Table Name: SUPPLIERS…
A: Insert the given data in SUPPLIERS TABLE: INSERT INTO SUPPLIERS VALUES(1, 'Lulu', 'DS', 'Salalah')…
Q: In the SQL Oracle Application List all employees who have not changed jobs even once. (Such…
A: DISTINCT : The statement SELECT DISTINCT will return the unique/distinct values from the table, this…
Q: Delete the employee who has the longest employment in the company using sql
A: can be done by sorting the table and then deleting the oldest date row. please see the SQL script in…
Q: QL DATABASE need the SQL statements FROM ATTACHED tables List the trip name of each trip that…
A: According to the question below the solution: As per our company guidelines we are supposed to…
Q: Using the university schema, write an SQL query to find the names and IDs of those instructors who…
A: SQL queries are written to fetch records from databases that are composed of several relations.…
Q: List every table that you have created thus far. Display the TABLE_SCHEMA and TABLE_NAME columns.…
A: Actually, database is a used to stores the data\information.
Q: List staff_id, last_update and amount from payment. Find the sum amount by each staff_id and assign…
A: Find the required query given as below :
Q: Show a list of employee id, names, department, years and job of any employee in the staff table who…
A: First you have to make a table called Employee after this you just have to enter random values to…
Q: Use KimTay Pet Supplies Database For each invoice, list the invoice number and invoice date along…
A: SQL We communicate with a relational database that use the computer language known as Structured…
Q: Write SQL queries to answer the following questions: What are the courses included in the Section…
A: What are the courses included in the Section table? List each course only once*/SELECT DISTINCT…
Q: Display details of employee with ID 150 or 160. using sql
A: To find the details of the employee having ID 150 or 160. Note: The detail of the table is given…
Q: Modify the CUSTOMER table to include the customer’s date of birth (CUST_DOB), which should store…
A: Modifying table Alter statement is used to modify column, add constraints, add columns, drop…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images
- Add the following record to the VACATION_UNIT table: condo ID: 20; location number: 2; unit number: A04; square feet: 1680; bedrooms: 3; bathrooms: 3; condo fee: 775; and owner number: BL720. Display the contents of the VACATION_UNIT table.Use the following table to answer the questions below: Table name: Customers Column Name Role Data Type Length Constraint customerID stores the ID of a customer Char 5 Primary key custFName stores the first name of a customer Varchar2 35 Cannot be null custLName Stores the last name of a customer Varchar2 35 Cannot be null custGender Store the gender of a customer Char 1 It should be ‘M’ or ‘F’ custDOB Stores the date of birth of a customer Date custIncome Store the income of a customer Number 4 Write in SQL a command that creates the table Customers according to the above description (2 marks). Write in SQL a statement that adds a new column named accountID of type Char(8). This column should be defined as a foreign key that relates the table Customers to the table Account (1.5 marks). Write in SQL a command that deletes the customers whose date of birth is after 22-Dec-1990 (1.5 Marks).…Use the following table to answer the question below: Table name: Customers Column Name Role Data Type Length Constraint customerID stores the ID of a customer Char 5 Primary key custFName stores the first name of a customer Varchar2 35 Cannot be null custLName Stores the last name of a customer Varchar2 35 Cannot be null custGender Store the gender of a customer Char 1 It should be ‘M’ or ‘F’ custDOB Stores the date of birth of a customer Date custIncome Store the income of a customer Number 4 Write a SQL query that displays the number of customers who born on the 16th day of a month . Write in SQL a query that displays the ids of the customers who have the highest income . Create a view named ‘customerDetails’ to hold all the details of customers whose first names start with ‘S’ and their incomes are between 500 and 1000 Omani Rials .
- Use the following table to answer the questions below: Table name: Customers Column Name Role Data Type Length Constraint customerID stores the ID of a Char 5 Primary key customer custFName stores the first name of a Varchar2 35 Cannot be null customer custLName Stores the last name of a Varchar2 35 Cannot be null customer custGender Store the gender of a Char 1 It should be M customer or 'F' custDOB Stores the date of birth of Date a customer custIncome Store the income of a Number customer a. Write in SQL a command that creates the table Customers according to the above description b. Write in SQL a statement that adds a new column named accountID of type Char(8). This column should be defined as a foreign key that relates the table Customers to the table Account c. Write in SQL a command that deletes the customers whose date of birth is after 22-Dec-1990 d. Write a SQL query that displays the number of customers who born on the 16th day of a month e. Write in SQL a query that…PRODUCTS PID DESC PRICE SID QTY 801 Pencil 3 1 10 802 A4 6 2 15 803 Ballpen 4 2 804 Marker 2 3 20 SUPPLIERS SID SNAME STYPE LOCATION 1 Lulu DS Salalah 2 C4 DS Saadah 3 Smile WS Awqad Display the maximum price of all the products in PRODUCTS table for each Supplier ID having a maximum price more than 5.Use the following table to answer the questions below: Table name: Customers Column Name Role Data Type Length Constraint customerID stores the ID of a Char 5 Primary key customer custFName stores the first name of a Varchar2 35 Cannot be null customer custLName Stores the last name of a Varchar2 35 Cannot be null customer custGender Store the gender of a Char 1 It should be M customer or 'F' custDOB Stores the date of birth of Date a customer custIncome Store the income of a Number customer d. Write a SQL query that displays the number of customers who born on the 16th day of a month e. Write in SQL a query that displays the ids of the customers who have the highest income f. Create a view named 'customerDetails' to hold all the details of customers whose first names start with 'S' and their incomes are between 500 and 1000 Omani Rials
- PRODUCTS PID DESC PRICE SID QTY 801 Pencil 3 1 10 802 A4 6 2 15 803 Ballpen 4 2 804 Marker 2 3 20 Display the Product ID, Description, and Quantity (QTY) of all the products in the PRODUCTS table whose PID is from 801 to 802 and whose quantity is less than 15.Examine this product table's column definitions:pid number primary keypname varchar2(50)You must display column headings as shown:Product_ID Product NameWhich SELECT statement does this? SELECT pid Product_ID, pname Product Name FROM product; SELECT pid Product_ID, pname "Product Name" FROM product; SELECT pid @Product_ID, pname @"Product Name" FROM product; SELECT pid AS Product_ID, pname AS Product Name FROM productQ1- List all employees whose job_id is IT_PROG and hired after 01-JAN-95 and earning more than5000.Q2- List all employee except those with employee_id 101, 102, 103, 104 and 105Q3- Display the city attribute from locations table. Show the ones that contain “South” in the city.Sort the list in descending order.Q4- Display the first name, last name, salary, manager id and job id of all employees whose last fourcharacters of job id ends with “LERK”.Q5- Display the first name, last name and salary of all employees. Round the salary to the nearestunit of 1000 (ex. Salary=4500 New Salary=5000). Label the column as "New Salary".
- I. Retrieve the SSN_NUMBER of all employees whose name starts with N. Attribute First Name Last Name SSN Number Data Type Varchar(15) Varchar(15) Char(9) Not Null Not Null Constraint Primary Key9. Find the total amount of tax paid by resident of NJ Hint: The tax cost stored in tax_amount column in the orders table The state name stored in state column in the addresses tableList the order number and order date for every order that was placed by Mary Nelson and that contains an order line for an iron. Use an INTERSECT operator. table name is:ORDER_LINEORLN_ORDER_NUMBER ORLN_PART_NUMBER ORLN_NUMBER_ORDERED ORLN_QUOTED_PRICE tablename is ORDER_TABLE ORDR_ORDER_NUMBER ORDR_ORDER_DATE ORDR_CUSTOMER_NUMBER tablename is CUSTOMER CUST_NUMBERCUST_LAST CUST_FIRST CUST_STREET CUST_CITY CUST_STATE CUST_ZIP_CODE CUST_BALANCE CUST_CREDIT_LIMIT CUST_SALES_REP_NUM tablename is PART PART_NUMBER PART_DESCRIPTION UNITS_ON_HAND ITEM_CLASS WAREHOUSE UNIT_PRICE tablename is SALES_REP SLSR_PKSLSR_LAST SLSR_FIRST SLSR_STREET SLSR_CITY SLSR_STATE SLSR_ZIP_CODE SLSR_TOTAL_COMMISSION SLSR_COMMISSION_RATE SELECT ORDR_ORDER_NUMBER, ORDR_ORDER_DATEFROM ORDER_TABLEWHERE ORDR_ORDER_NUMBER IN (SELECT ORLN_ORDER_NUMBERFROM ORDER_LINEWHERE ORLN_PART_NUMBER IN (SELECT PART_NUMBERFROM PARTWHERE…