Preview

Sql - Queries

Satisfactory Essays
Open Document
Open Document
333 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Sql - Queries
SQL Queries

I. Give a database schema for a library management system as the following picture.

[pic]

1. How many copies of the book titled Database Fundamentals” are owned by the library branch whose name is "University of Delhi"? 2. How many copies of the book titled The Lost Tribe are owned by each library branch? 3. Retrieve the names of all borrowers who do not have any books checked out. 4. For each book that is loaned out from the " University of Delhi " branch and whose DueDate is today, retrieve the book title, the borrower's name, and the borrower's address. 5. For each library branch, retrieve the branch name and the total number of books loaned out from that branch. 6. Retrieve the names, addresses, and number of books checked out for all borrowers who have more than five books checked out. 7. For each book authored (or co-authored) by "Stephen King", retrieve the title and the number of copies owned by the library branch whose name is "Central"

II Give a database schema of a company as the following picture.

[pic]

1. Retrieve the names of employees in department 5 who work more than 10 hours per week on the 'ProductX' project. 2. For each project, list the project name and the total hours per week (by all employees) spent on that project. 3. Retrieve the names of employees who work on every project. 4. Retrieve the names of employees who do not work on any project. 5. Find the names and addresses of employees who work on at least one project located in Houston but whose department has no location in Houston. 6. List the last names of department managers who have no dependents. 7. Find details of those employees whose salary is > the average salary for all employees. Output salary in descending order. 8. Find details of those employees whose salary is > the average salary for all employees in his/her department. Output salary in ascending

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Acg 320

    • 496 Words
    • 2 Pages

    Determine which method would result in the greatest net income for the year ending December 31, 2005.…

    • 496 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Chapter 7-43 Acl Problem

    • 402 Words
    • 2 Pages

    d. The report on the following page shows gross pay by department. (Use the Summarize command on the Gross Pay column, save to a file, and print.) Note that this screenshot was produced using the “Screen” option in the Output tab of the Summarize window. Students’ hardcopy printouts will appear slightly different, but will contain the same…

    • 402 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    a) A firm has three categories of employees: juniors, seniors and supervisors. They earn $12, $18 and $24 per hour respectively. They have an output of 10, 16 and 22 units of product per hour respectively. The 250 employees of the plant have a total…

    • 1317 Words
    • 6 Pages
    Good Essays
  • Good Essays

    Kudler Fine Food Week 4

    • 284 Words
    • 2 Pages

    · Calculate the maximum salary for exempt employees and the maximum salary for non-exempt employees.…

    • 284 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Mis562 Week 2

    • 2131 Words
    • 9 Pages

    3. SQL> --3. Repeat exercise 2 for any employee that is not a manager or earns a salary > $1,000…

    • 2131 Words
    • 9 Pages
    Satisfactory Essays
  • Satisfactory Essays

    SQL Queries

    • 423 Words
    • 2 Pages

    Query 1: Find the names, ID's, and number of credits of all students who are math majors. The result should be a three column table.…

    • 423 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    3. Analyze the job profitability by filling out the following sheet with dollars. (Hint: Add labor cost and allocated MOH.) Job # 61001 61002 Revenue Materials Job…

    • 395 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Week 1 Submission

    • 1120 Words
    • 5 Pages

    5. Select all employees that are in department 10 and 30. Use the IN operator.…

    • 1120 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Compensation Case 1

    • 661 Words
    • 2 Pages

    Determine whether base pay should be an important component of compensation for the sales staff. If so determine the most appropriate method of determining base pay for the sales staff. What factors did you consider in making these decisions?…

    • 661 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    G22 health and safety

    • 266 Words
    • 2 Pages

    c. Detail the lists and reports available within the workplace, and state the information they give…

    • 266 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    BIS 155 Final

    • 2158 Words
    • 9 Pages

    1. (TCO 1) You work for a local construction firm, "DeVry Engineering Group" and your supervisor wants to test your knowledge and skills with Microsoft Excel and has instructed you to develop a spreadsheet to calculate weekly payroll for “15” employees with the following assumptions:…

    • 2158 Words
    • 9 Pages
    Good Essays
  • Satisfactory Essays

    It210 Week 2

    • 399 Words
    • 2 Pages

    The owners of the Super Supermarket would like to have a program that computes the monthly gross pay of their employees as well as the employee’s net pay. The input for this program is an employee ID number, hourly rate of pay, and number of regular and overtime hours worked. Gross pay is the sum of the wages earned from regular hours and overtime hours; overtime is paid at 1.5 times the regular rate. Net pay is gross pay minus deductions. Assume that deductions are taken for tax withholding (30 percent of gross pay) and parking ($10 per month). You will need the following variables:…

    • 399 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    By the database, we know that 11 people from the department 1; 100 people from the department 2; 177 people from the department 3; So,…

    • 1009 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    The Central Library Management System project is developed to store record. The aim of the research work is to develop the system for issuing books to students, teachers, add books, issue books, and return books, Fine calculation.…

    • 369 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    saad

    • 351 Words
    • 2 Pages

    A college strengthens its educational level through the advancement of its library.The Computerized Library System aimed to enhance the procedures of the library, from manually operated to a computerized system. This proposal’s purpose was to ease the transactions in the library, i.e., lending of books,storing of books, search engine for books, manage members of the library and secure the library system.…

    • 351 Words
    • 2 Pages
    Satisfactory Essays

Related Topics