
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question

Transcribed Image Text:Write an SQL query to fetch last_name from employees table
using the alias name as Employee Name.
• Write an SQL query to fetch unique values of department_id
from employees' table.
Write an SQL query to print all employee details from
employees table sorted based on first_name ascending.
Write an SQL query to print all employee details from
employees table sorted based on last_name ascending and
department_id descending.
Write an SQL query to print details for employees with the
first_name as “Lex" and "Den" from employees table.
Write an SQL query to print details of employees excluding
last_name "Khoo" and "Gee" from employees table.
• Write an SQL query to print details of the employees whose
first_name contains 'a'.
• Write an SQL query to print details of the employees whose
email ends with 'a'.
Write an SQL query to print details of the employees whose
last_name ends with 'h' and contains exactly six alphabets.
• Write an SQL query to print details of the employees whose
SALARY lies within 6500 and 17499.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Translate the following SQL query to a pandas statement in Python so that it can be executed on the pandas DataFrame. SELECT COUNT(*) FROM sqldata WHERE cases > 1000 AND date = "2020-10-10";arrow_forward- Write SQL statement to list the OrderID, CustName and OrderDate from Orders table using INNER JOIN with Customers table on CustID - Create a table that list the OrderID, CustID and CustName from Orders table using LEFT JOIN with Customers table on CustID.arrow_forwardList all the names of the production companies and all the movie titles, all together in one single column in the result set. Sort the result column alphabetically. For example, the first row will be Abominable, the second row will be Cars, the third row will be Columbia Pictures, and so on. use sql ( so there a table of 'movie' and a table of 'production')arrow_forward
- Correct and detailed answer is must for Upvote. Thank you!arrow_forwardRefer to the film and inventory tables of the Sakila database. The tables in this lab have the same columns and data types but fewer rows. Write a query that lists the titles of films with the fewest rows in the inventory table. This query requires a subquery that computes the minimum of counts by film_id: SELECT MIN(count_film_id) FROM ( SELECT COUNT(film_id) AS count_film_id FROM inventory GROUP BY film_id ) AS temp_table; This subquery is provided in the template.arrow_forward(Intro to Java)arrow_forward
- Create a function to insert a new product into an existing order, include the product id, unit price, quantity. The output of the function is the message to notify the calling program whether the update succeeded or not. note : Note: Sql code need not java don't waste my time by giving java codearrow_forwardd) Write SQL query to insert the entry ("Shaun", "Paul", "Football", 4) in the table playerEntries(first_name, last_name, category, level).arrow_forwardQuestion: Which colleges offer courses? (Change the SQL query to an relational algebra query.) **Please show the resulting tuples output based on your answer as well in a table for further explanation. ** SELECT COURSE.COLLEGE FROM COURSE, DEPARTMENT WHERE COURSE.DCODE = DEPARTMENT.DCODE;arrow_forward
- In a 1024KB segment, memory is allocated using the Buddy System. The following memory allocations are requested. What are the allocated memory for each? (Do not enter K in the answer. Just the numbers) 1. Request 5 KB Requst5KB = 2. Request 135 KB Requst135KB 3. Request 14 KB Requst14KB 4. Request 3 KB Requst3KB 5. Request 12 KB Requst12KB = 6. Request 257KB Requst257KB = The following releases of memory happened. Perform coalescing whenever possible: • Release 3 KB Release 5 KB • Release 14 KB Release 12 KB What is the available memory after coalescing? available [Hint: No need to draw the tree. Looking at the numbers, you can find the answers]arrow_forwarda. Write a query to get all unique first names that start with the letter W from the student table. Output the names in all upper case. Sort the results in ascending order. Write a query to get the first 3 characters of all last names that start with an T from the student table and sort them in descending order.arrow_forwardTask Write a query to retrieve the records of students who have their total marks greater than or equal to 500 Total marks refer to the sum of the marks of a single student. The result should be in the following format • STUDENT ID • SUM OF MARKS The result should be sorted in descending order by STUDENT D Table description Table: marks Name STUDENT_ID Type Description INTEGER This is the student's unique ID These are the marks obtained STUDENT MARKS INTEGERarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education