List all customers who are either from New York or had a grade above 100.
Q: LIST THE FIRST AND LAST NAMES OF ALL OWNERS WHO OWN A TWO-BEDROOM PROPERTY. USE THE IN OPERATOR IN…
A: Considering there are 2 tables:- OWNER: which holds the OWNER_NUM, FIRST_NAME, and LAST_NAME…
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: Insert into the LARGE_PROPERTY table the office number, address, bedrooms, floors, monthly rent, and…
A: We need to insert some columns from property table to largeproperty table whose square footage is…
Q: Which month and year (e.g., March 2017) had the greatest number of ER visits? The result table…
A: CREATE TABLE Patient( Patient_Id int[10],gender char[5],age int[5],PRIMARY KEY(Patient_Id));…
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: Find the rep number, last name, and first name of each sales rep who represents at least one…
A: The, answer has given below:
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: List the last name and first name of every owner not located in Lewiston
A: given, owner table content all required fields that we want last name, first name, city.
Q: Use a subquery to find employees' last names and hire date from the employees table whose manager is…
A: Let us see the answer:-
Q: List the number of customers living at each state that is included in the Customer_T table.
A: Query:-
Q: |The Employee table has the following columns: • ID - integer, primary key FirstName -…
A: Below im writing the statement
Q: Find the first names and last names of employees if they got a salary increase more than 10% in the…
A: create table commands and inserting sample data into the table for query create table employees…
Q: 9. Find the room number with no booking.
A: Introduction: The syntax to write a query in SQL is shown below. SELECT table_columns FROM…
Q: what is the sql query needed to get total number of beers?
A: SQL (Structured Query Language) is a standardized programming language that is used to oversee…
Q: Which customers live in New Jersey? List each customer's last name, first name, and state. SQL…
A: Note: column names are assumed since table schema is not provided. Query:
Q: FROM SALESPERSON WHERE SPNUM= (SELECT SPNUM FROM CUSTOMER WHERE CUSTNUM=772): What is this subquery…
A: Given subquery SELECT SPNUM FROM CUSTOMER WHERE CUSTNUM=772
Q: Find the number of (unique) products that have been sold to more than 10 customers. SQL Question
A: We need to write a SQL query for finding the number of (unique) products that have been sold to more…
Q: Write query "List the title and ISBN of all books using the BOOKS table"
A: Query to display all the records of the books table: SELECT ISBN, BOOK_TITLE FROM BOOKS;
Q: Return the name of the most expensive item in price_list. If there is a tie for the most expensive…
A: Kindly indent the code as shown in the screenshot below :
Q: 1. Delete the customer(s) who not ordering. 2. Update CITY_NAME of CUSTOMER table for all customers.…
A: As per our guidelines, we are supposed to answer only 1st three parts. Kindly repost the remaining…
Q: Find the listing of customers who did not make purchases during the invoicing period. Sort the…
A: The SQL query is given below Assumptions regarding column names (purchase date and invoicing date)…
Q: Display last_names of students whose values are Villegas, Villamonte and Villas.
A: select last_name from students where last_name = “Villegas” or last_name = “Villamonte” or last_name…
Q: You need to calculate the total of all prices in the product table. Which group function do you use?…
A:
Q: What SQL query is required to determine the total quantity of beers?
A: Introduction: SQL (Structured Query Language) is a standardised computer language used to manage…
Q: Find the names and surnames of the customers who received the "Kalem" in 2018 but did not receive it…
A: Note: we have provided answer according to table and attributes mention in picture part. we need to…
Q: balance that exceeds their credit limit?
A: How many customers have a balance that exceeds their credit limit? Below is the query :
Q: Find the max profit of books in each category. 2- Find out how many books are in each order, sort…
A: SELECT CATEGORY, MAX(PROFIT) FROM BOOKS GROUP BY CATEGORY
Q: Delete all the employees in the department that has less than 3 employees using sql
A: Explanation: The deletion is based on “DEPTNO” in “EMPLOYEE” table. “delete” command is used to…
Q: Find the names of all patients who have not consulted any doctor
A: Patient Table: create table Patient(PID Integer Primary Key,Name varchar2(30),Gender…
Q: From the above student table, find the students whose status is registered but not postponed using…
A: We are going to find those students whose status is registered but not Postponed. And we are going…
Q: Find the total of the balances for all customers represented by sales rep 10 with balances that are…
A: Note- As I solved this question in one part I know that here I have to write the SQL query for the…
Q: Find out the customers with balance of $3500 or more. Your result should include the most recent…
A: SELECT INVOICE .INV_NUM WHERE TOP INVOICE .INV_DATE DESC, INVOICE .CUST_CODE FROM INVOICE,…
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: List all customers who were referred to the bookstore by another customer. List each customer's last…
A: The way the question is put up. It is very likely that the question is of SQL language. Also, you…
Q: Find employees who are making less than the average of the employees hired in the same year using…
A: SELECT ENAME FROM employees WHERE salary < (SELECT AVG (salary) FROM employees )
Q: Show the employees who were in the engineering department as of Jan. 1, 2005 (using SQL)
A: Given : Show the employees who were in the engineering department as of Jan. 1, 2005 (using SQL)…
Q: Using SQL find the number of employees from the table:
A: We just need to count all the rows in the given table that will result in the number of employess.
Q: What will be the result of the following query? SELECT count(*) FROM enrollment GROUP BY courseid;
A: query : SELECT COUNT(*) FROM enrollment GROUP BY courceid; ans-> A - numbers 3 and 1 AMG ->…
Q: For each customer who has a post-paid service, show how many of these customers have opted to have…
A: COUNT(): The COUNT() function calculates the number of items that meet a given set of criteria.…
Q: can you slove more 3 queries
A: As per guidelines I can answer only one. Thank You.
Q: List student names and total reservations for all students whose have reservad a book more then one…
A: The question is to list student names and total reservations for all students whose have reserved a…
Q: What is the number of seats booked for the family?
A: As per the above information It is clear that the above information is about ticket booking ,This…
Q: • Select the FirstName of customers with the highest Total in Invoice.
A: We have to select first-name of customers with the highest total invoice
Q: Display all last name of students table who did not input their address or telephone and…
A: Display all last _name of students table who did not input their address or telephone and mobile_…
Q: Find the name of the students and the city name whose age is above 20 years and below 24 years?
A: Here use selection operator to select only those student whose age is between 20 and 24. Then use…
Step by step
Solved in 2 steps with 1 images
- A new movie theater has opened in your town and the owner needs a system that facilitates theReservation of seats in the cinema’s auditorium. Design a windows application Form thatFacilitates the reservation of tickets for this Movie Theater.Design and connect the following database using LINQ or Entity Framework for the givenscenario.Database:Movie (id (PK), name, description )ScheduleMovie (id (PK), movieID (FK), time, price)Seat (id (PK), number, rownumber, columnnumber)Reservation (id (PK), scheduledMovie(FK), seatnum(FK), customerId(FK), haspaidTicket)Customer (id (PK), email, name)The user of this application is a cinema staff, for example the admin and the Cashier.The Admin Panel The admin registers the cashiers and also, add new movies when released. The panel has various menus named Add, Remove, and detail Add menu has sub menu named AddMovie, and AddCashier. Remove menu has sub menunamed removeMovie and removeCashier. Click event raised on the click of AddMovie which…Take a look at the database structure for cities in nations below. There are numerous cities in a nation, and the same city name can be found in several countries. Country (integer ID, string (unique) name) (serialNo: integer (not null), CountryID: integer, CityName: string, Population: integer) Is it possible for a city to have an unknown CityName? No, it's against the rules of the domain. Yes. No, infringe.You are given the following database schema:Sailors(sid, sname, rating, age)Boats(bid, bname, color)Reserves(sid, bid, day)Consider the join on Sailors ▷◁ Reserves and assume that you have the following statistics andlimitations: * You have available 9 pages in main memory.* Sailors: 100000 tuples, 1000 pages; Boats: 2000 tuples, 10 pages; Reserves: 110000 tuples,550 pages 1. Calculate the I/O cost of this join using the Block Nested Loop algorithm?
- Given the following relational schema of a database library (primary keys are underlined and foreign keys are preceded by #): Student(studentNumber, StudentName, studentAddress) Book(bookNumber, bookTitle, #authorNumber, #editorNumber, yearEdition) Author(authorNumber, authorName, authorAddress) Editor(editorNumber, editorName, editorAddress) Borrow(#studentNumber, #bookNumber, borrowDate, returnDate) Write the following queries in Relational Algebra: Find the details of students who borrowed the book titled ‘Database Management Systems’Given the following relational schema of a database library (primary keys are underlined and foreign keys are preceded by #): Student(studentNumber, StudentName, studentAddress) Book(bookNumber, bookTitle, #authorNumber, #editorNumber, yearEdition) Author(authorNumber, authorName, authorAddress) Editor(editorNumber, editorName, editorAddress) Borrow(#studentNumber, #bookNumber, borrowDate, returnDate) Write the following queries in Relational Algebra: List the details (bookNumber, bookTitle) of books whose author’s name is ‘Ramakrishnan’Given the relational database shop defined in the script below; create database shop;use shop; create table users( id int null auto_increment, firstname varchar(255), lastname varchar(255) not null, primary key (id)); create table items( id int null auto_increment, name varchar(255), price float, primary key (id)); create table orders( id int null auto_increment, id_users int not null, id_items int not null, primary key (id), foreign key (id_users) references users(id), foreign key (id_items) references items(id)); write three SQL queries to answer the following questions 1.- All products(items) in the shop catalog; product code, name and price 2.- Products sold in the shop; product code, name and price and full name of buyer. 3.- Products in stock (not sold); product code, name and price
- Following on your BIG break to make a database for an… organization that organizes table tennis tournaments (also known as “Tourney”s) at their premises on behalf of clubs, you’ve written down the business rules as follows: One Match belongs to One Tourney, and not none. One Tourney has Many Matches, at least one and a maximum of 128. One Match takes place on One Table, and not none. One Table is used in Many Matches, and possibly none. One Match belongs to one Category, and not none. One Category appears in Many Matches, and possibly none and a max of 32. One Match involves Many Players, minimum 2 and maximum 4. One Player plays Many Matches, and possibly none. You have also been given a small sample of their records (which is not in the least in relational format), which may prove useful. It is below. Match Number Tourney Tourney Start Date Day Time Slot In Day Player Names(Team 1) Player Names(Team 2) Player IDs (Team 1) Player IDs(Team 2)…The following is a relational schema for a database to document sharksightings for a research project. Primary keys are underlined. ForeignKeys are identified by FK, and their name indicates the attribute that theyreference.________________________________________________________________Sharks(shark_id:Integer, name:String, species_name:String,tagged_by_mission_id:Integer (FK))Sightings(shark_id:Integer (FK), sighting_num:Integer,sight_time:Timestamp, lat:Real, lng:Real, ocean:String, mission_id:Integer(FK))Missions(mission_id:Integer, start_date:Date, end_date:Date,vessel_id:Integer (FK))ResearchVessels(vessel_id:Integer, name:String)________________________________________________________________Sharks identified by a unique id, have a name which is not necessarilyunique, and a scientific species name.All Sharks are tagged and are sighted by Research Vessels, which areresearch ships that go on research Missions throughout the year. EachMission has a start and end date. Shark…What are the four basic types of operations for a database application? a. Insert, Select, Update, and Delete b. Insert, Update, Delete, and Create c. Insert, Update, Delete, and Render d. Insert, Select, Update, and Render If stringa="Good Morning", what is the value of stringa[1:5]? a. "Good " b. "ood " c. "Good" d. "ood M" The instance that “a survey respondent in service occupation (x) is less likely to report income ” is an example of __________ . a. Missing completely at random. b. Missing at random. c. Missing not at random. d. None of the above.
- A University database is described by the following relational schema. Student (StudentId, Name, MatrNr, Faculty)Lecturer (LecturerID, Name, Institute, Salary) Faculty (FacultyID, PAYENo, Name, PersonType, Department, Faculty, Institute, TeachingStatus, Salary, CarLotNo, ComputerNo) Write one SQL script to populate the faculty database with the three lecturers below given the following critical information for each lecturer. 1- John Doe is new and so does not have a computer.2- Jack Sprat does not drive a car.3- Win Ling is a visiting professorWe have the following functional dependency A -> B. The following is a well-formed database design. MYTABLE (TheKey, A, B, C) True FalseYou are given the following database schema:Sailors(sid, sname, rating, age)Boats(bid, bname, color)Reserves(sid, bid, day)Consider the join on Sailors ▷◁ Reserves and assume that you have the following statistics andlimitations: * You have available 9 pages in main memory.* Sailors: 100000 tuples, 1000 pages; Boats: 2000 tuples, 10 pages; Reserves: 110000 tuples,550 pages 1. Calculate the I/O cost of this join using the Block Nested Loop algorithm? 2. Calculate the I/O cost of sorting the Sailors relation?