Suppose you want to get all student names that start with letter ‘M’ and end on ‘D’. Write a regular expression to get this type of data from database table.
Q: This is a database system question regarding SELECT: Which of the following statements is true for…
A: The above question is solved in step 2:-
Q: For any student: list out their courses in order For any course: list out the students in order in…
A: For first two cases SORTING is used to determine courses and student list in order way so SORTING is…
Q: Subject: Technology of Large Databases. You have a table AUDITORIUMS with a nested table that…
A: According to the information given:- we have to write the query in order to find out the class with…
Q: Q1 Write a program in PL/SQL to print a list of names employees and the names of the departments to…
A: Textual PL/SQL Code :- -- create a table --CREATE TABLE Employees ( id INTEGER PRIMARY KEY, Name…
Q: - the table is joined to itself using alias to differentiate the table from itself. In Right outer…
A: Explanation: Right outer join: SELECT column_name(s)FROM table1RIGHT JOIN table2ON…
Q: Suppose a database in sql Alter table employees and add column of Bonus with same data type as…
A: Table Name: employees Column Name: Bonus Data Type: int
Q: Assignment : PL/SQL Practice Note: PL/SQL can be executed in SQL*Plus or SQL Developer or…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: A manager has a list of items that have been sorted according to an item ID. Some of them are…
A: Given is an excel data, where student wants to find a number of duplicates as they occur.
Q: In Sql Oracle Apex application, Using GROUPING SETS, write a query to show the following groupings:…
A: First query performs a grouping on two columns Department_Id and Job_Id Group By X, Y means put all…
Q: Database course: Write SQL queries to do the following A. List names of IT students.…
A: The SQL queries are given in step 2.
Q: There's a "friend_requests" table that has a column "action_taken" that displays if the friend…
A: SELECT Count(action_id) FROM friend_requests where action_taken = "Accepted"; This query will return…
Q: Can you write an SQL program that includes tables that classify different levels of college students…
A: The objective of the question is to create an SQL program that classifies college students into…
Q: Write a SQL statement to get the list of all the law firms from the database in alphabetical order…
A: as per Bartleby guidelines we are supposed to answer?️ only one question. Kindly repost other…
Q: Instructions Write SQL queries to solve the following problems. We will be using the “university”…
A: The objective of the question is to write SQL queries to extract specific information from the…
Q: 3.1. As a sales agent, you have been tasked to write SQL query that searches the…
A: Answer: We have written the SQL query for the given information so for more details we will see in…
Q: # Question 1 #Using the World database, in the city table, insert a new city for the Tasmania…
A: What is SQL: SQL is a language for interacting with databases. SQL is the standard language for…
Q: 154 -- Figure out and return for each employee the gender based on the title of courtesy 155 Ms.,…
A: In modern database management systems, it's often required to derive insights or information from…
Q: the following code is all part of a mockup "student information management system", with its purpose…
A: Algorithm: Student Information Management System1. Define the Student class: - Create a class…
Q: The code shown below is designed to increment through each row in a database table. Correct the…
A: We have to increment through each row in a database table, for that we can use any of the following…
Q: SQL Sailors (sid: integer, sname: string, rating: integer, age: real) Boats (bid: integer, bname:…
A: We need to write the SQL query to compute named and ratings of the sailors who sailed two different…
Q: Write SQL queries for the following database: id Customers name email Categories id name id…
A: Since there are multiple parts to a single question, the first three subparts are answered for you.…
Q: PYTHON CODE Using Artists.csv (link below), write a query that returns all lines that are female…
A: It is defined as a powerful general-purpose programming language. It is used in web development,…
Q: 1. Create a PL/SQL function. The minimal requirements: using the cursor in PLSQL function, retrieve…
A: PLSQL table is used to hold the data in the PLSQL area for any processing. So, this serves as…
Q: IN SQL ** Write a query sentence to display the names, jobs, dates of appointment and employee…
A: Given Columns to display: name, job, appointmentDate,empNo Condition: First column has to be empNo…
Q: (vin, make, model, year) - car vehicle ID #, manufacturer, mod mple: (17234, Toyota, Prius, 2008) or…
A: I have written the query below:
Q: Write a Java method with appropriate SQL command to retrieve all the records from Employee table…
A: first of all, we need to register the driver. then getting the connection from the database using…
Q: 1. Prepare a list of orders by Shipper showing the Shipper ID, Order ID, Product ID and Quantity.…
A: In this question we have to understand about given SQL database and prepare the list of queries…
Q: There's a "friend_requests" table that has a column "action_taken" that displays if the friend…
A: Given Data : Table name : friend_requests Table attributes : action_id requester_id requestee_id…
Q: If you're using MySQL, import the information from Types.txt into the BOOK TYPE database.
A: There must be one entry on each line of the Types.txt text file that you generate, and each value…
Q: Sales Database: Customers(custId, lastName, firstName, address, phone, creditLimit)…
A: A Sales Database consisting of three tables: Customers, Orders, and Items. The table structures and…
Q: struct student { char name[20]; char studentID[10]; char phonenum [9]; char advisor [20]; float gpa;
A: A structure is a user-defined data type in C/C++. It groups items of different types into a single…
Q: Write a detailed reflection on “Comparison of NoSQL and SQL Databases in the Cloud”. You can include…
A: SQL (Structured Query Language) is a standard programming language that used to manage relational…
Q: Import the following database: CREATE DATABASE COUNTRIES; USE COUNTRIES; DROP TABLE IF EXISTS…
A: Here a for this demonstration , using WAMP server and phpMyAdmin MySQL database.Below are the steps…
Q: ++ Write a program that will allow a user to enter students into a database. The student…
A: Please find the answer below :
Q: Imagine that you are a database manager at a company that makes custom shirts. One column in the…
A: Create the sample table shirts having columns idshirt as integer and autoincremented, wholesaleprice…
Q: There are three tables in this database (see image). Write MYSQL code for: (1) Create a trigger…
A: (1) MYSQL code for creating trigger “insert_inventory” on table “Inventory”:…
Q: Write a program that queries the world database to determine in which country the residents have the…
A: 1. The program is designed to interact with a MySQL database called "world" in order to perform two…
Q: Database: CUSTOMER (CustomerID, LastName, FIrstName, Phone, EmailAddress) PURCHASE (InvoiceNumber,…
A: Below is the required query:
Q: 1) Assume the EMPLOYEE table has the following rows ID DEPT SALARY NAME 100 SALES 40000 Smith 101 RD…
A: Establishing a Virtual Private Database (VPD) is essential to preserving the secrecy and security of…
Q: Develop a PL/SQL block that would go through all the employees from EMPLOYEES table who work in…
A: Solution SELECT * FROM departments where department_id =90; BULK COLLECT Clause for Selecting…
Q: Let's wa(k through a review of basic SQL syntax, using as an example the database that was mentioned…
A: Using the above table, implementation of the following queries.
Q: Translate the following pandas statement in Python to a SQL query so that it can be executed on the…
A: In above statement I. 10*dfdata['case']-->mean multiple each row of 'case'(may consist number)…
Q: SQL A table Products have: a name (TEXT) a description (TEXT) a unit cost stored in cents…
A: HI THERE,I AM ADDING SCHEMA AND QUERIES BELOWPLEASE GO THROUGH IT THANK YOU
Q1:
Suppose you want to get all student names that start with letter ‘M’ and end on ‘D’. Write a regular expression to get this type of data from
SQl
Step by step
Solved in 2 steps with 1 images
- Write a PL/SQL Programming block to do below actions 2.Before you work on Quesiton 2 , please create a table because you will be inserting numbers in thisMessages tableCREATE TABLE messages( RESULTS NUMBER)Run below query to see if there is any data :SELECT * FROM MESSAGESYou have the following tables: MANAGERS (MANAGER_ID, LAST_NAME, FIRST_NAME, DEPARTMENT) ACCOUNTS (ACCOUNT_NUMBER, MANAGER_ID, CUST_ID, BALANCE) CUSTOMERS (CUST_ID, LAST_NAME, FIRST_NAME) Write a SQL statement that lists account number, balance, MANAGER’s last name, CUSTOMER ID, and CUSTOMER’s last name for every account in the ACCOUNTS table.Below is “Book Order,” the only table in library management system’s database. The design of “Book Order” as you may tell is in the zero normal formal form, you as the database designer want to convert the design into the third normal form. Order ID Special order date Customer ID Customer last name Customer First name Customer birth date Book ISBN1 Book Title 1 Book Author 1 Book publication year 1 Book ISBN2 Book Title 2 Book Author 2 Book publication year 2 Store ID Store name Store location Special order status Book Order(Order ID, Special order date, Customer ID, Customer last name, Customer First name, Customer birth date, Book ISBN1, Book Title 1, Book Author 1, Book publication year 1, Book ISBN2, Book Title 2, Book Author 2, Book publication year 2, Store ID, Store name, Store location, Special order status)
- Suppose you have the following information: Name ID GPA sami 102 90 sara 550 66 A. Define a CLIPS template "student" to represent the elements name, id, gpa. B. Add the two records to the database. Your answerFill the blanks with the suitable PL/SQL statements that correct each of the errors that appear in the given PL/SQL program. declare vAddress employee.Address%VR0WTYPE; begin select ename , address into vAddress from employee where salary = 1500; DBMS_OUTPUT.PUT_LINE('NOM =' || vEname || 'Adresse=' || vAddress ); exception when MANYROWS then dbms_output.put_line("This query returned many rows"); end;SQL QUERIES Employees(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE,JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID,DEPARTMENT_NAME)Department(DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)Location(LOCATION_ID,STREET_ADDRESS,POSTAL_CODE,CITY,STATE_PROVINCE,COUNTRY_ID) Write a query in SQL to display the DEPARTMENT_NAME of all those Departments whoseDEPARTMENT_ID is greater than the DEPARTMENT_ID of Physics department. Write a Query in SQL to show the FIRST_NAME of all those employees whose salary is lessthan the salary of all those employees whose MANAGER_ID is 101 or 102.
- WorksOn Database: Employee (EmployeeNumber, EmployeeName, BirthDate, Title, Salary, DepartmentNumber) Project (ProjectNumber, ProjectName, Budget, DepartmentNumber) Department (DepartmentNumber, DepartmentName, ManagerNumber) WorksOn (EmployeeNumber, ProjectNumber, Responsibility, Hours) Questions: 1) Write an SQL query that returns the project number and name for projects with a budget no greater than $1,050,000. 2) Write an SQL query that returns all works on records where hours worked is less than 5 and the responsibility is 'Manager'. 3) Write an SQL query that returns the employees (number and name only) who have a title of 'EE' or 'SA' and make more than $50,000. 4) Write an SQL query that returns the employees (name and salary only) in department 'D1' ordered by decreasing salary. 5) Write an SQL query that returns the departments (all fields) ordered by descending department name.**In SQL** Write a SELECT statement that returns these columns: InstructorDept The DepartmentName column from the Departments table for a related instructor LastName The LastName column from the Instructors table FirstName The FirstName column from the Instructors table CourseDescription The CourseDescription column from the Courses table CourseDept The DepartmentName column from the Departments table for a related instructor Return one row for each course that’s in a different department than the department of the instructor assigned to teach that course. (Hint: You will need to join the Departments table to both the Instructors table and the Courses table, which will require you to use table aliases to distinguish the two tables.)SCENARIO:A database contains information about ticket reservations for movie performances. To make a reservation you must be registered as a user of the system. In order to register you choose a unique username and enter your name, address, and telephone number (the address is optional). When you use the system later, you just have to enter your username. In the system, a number of theaters show movies. Each theater has a name and a number of (unnumbered) seats. A movie is described by its name only. (In a real system you would, of course, store more information, such as actor biographies, poster images, video clips, etc.) A movie may be shown several times, but then during different days. This means that each movie is shown at most once on any day. You can only reserve one ticket at a time to a performance (if you want several tickets for the same performance you must make several separate reservations) and cannot reserve more tickets than are available at a performance. When you make…
- Consider a database with the following tables: v Patient(PatientID. PatientName, NumberOfVisits) v Doctor(DoctorID, DoctorName) v Appointment(ApplD, DoctorID, PatientID. Date, time) Write SQL statements or the necessary steps that do the following: a) Write the SQL statements required to create the above tables. You have to choose the best data type for each column, and all necessary keys (primary and foreignInstructor(Instructor_Id, Instructor_Name, specialization, Address,#Department_Id)Department(Department_Id, Department_Name)Course(Course_code, Course_Title,Credit_hours,Contact_hours,#Department_Id)Teaching(#Instructor_Id, #Course_code)a) Express in SQL the following queries:i. Change to 6 the number of contact hours of the course which has thecode “ITDR2104”.ii. Add a new column named instructorLoad of type Number(2) to thetable instructor.iii. List the details of all the courses having a code that starts with“ITDR”. The output should be sorted in descending order by credithours.iv. Find the number of courses taught by the instructor whose name is“Ahmed”.v. List the names of all departments along with the number of coursesoffered by each department.vi. Find the titles of courses, which are taught by the instructor who isnamed “Ahmed”.b) Create a view named instructor_of_DBCourse to contain the details(Instructor_Name, specialization, Address, Department_Id) ofinstructors who teach…SQL Database Write PL/SQL or T-SQL procedures to accomplish the following tasks: Obtain the first name and last name, separated by a space, of the guide whose number currently is stored in I_GUIDE_NUM. Place these values in the variables I_FIRST_NAME and I_LAST_NAME. Output the contents of I_GUIDE_NUM, I_FIRST_NAME, and I_ LAST_NAME. Obtain the number of persons, customer number, and customer last name for every reservation whose ID currently is stored in I_RESERVATION_ID. Place these values in the variables I_NUM_PERSONS, I_CUSTOMER_NUM, and I_LAST_NAME, respectively. Output the contents of I_NUM_PERSONS, I_CUSTOMER_NUM, and I_LAST_NAME. Add a row to the GUIDE table. Change the last name of the guide whose number is stored in I_GUIDE_NUM to the value currently found in I_LAST_NAME. Delete the guide whose number is stored in I_GUIDE_NUM