Question

In: Computer Science

Write and run the SQL to list the different expected graduation dates [class of 20XX] in...

Write and run the SQL to list the different expected graduation dates [class of 20XX] in the BSU_Students table. List each expected graduation date only once.  

Solutions

Expert Solution

Answer

SQL code

SELECT Distinct Stuexpectedgraddate

FROM BSU_Students;

Explanation

Output

---

am not able to find original database

i created sample one for the purpose of explanation

all the best

1 2 CREATE TABLE BSU_Students(Id integer PRIMARY KEY, Stuexpectedgraddate date); | min 6 7 INSERT INTO BSU_Students VALUES (101, '15-5-2021'); INSERT INTO BSU_Students VALUES (102, '15-5-2021'); INSERT INTO BSU_Students VALUES (103, '15-5-2022'); INSERT INTO BSU_Students VALUES (184, '15-5-2023'); INSERT INTO BSU_Students VALUES (105, '15-5-2023'); 8 9 10 11 12 SELECT Distinct Stuexpectedgraddate From BSU_Students;


Related Solutions

Write and run SQL statements to complete the following tasks Show the details of the employees...
Write and run SQL statements to complete the following tasks Show the details of the employees who are located in area code 901 and their manager employee number is 108. Show the details of the employees who are also mangers. Show the details of the customers whose balance is greater than 220 but less than 500. Show the details of the customers whose balance is highest. Show customer 10014’s name and the product’s descriptions which he/she purchased and the number...
Write and run SQL statements to complete the following tasks Show the details of the vendors...
Write and run SQL statements to complete the following tasks Show the details of the vendors who are located in area code 615. Show the details of the products that do not have a value for the attribute v_code. Show the details of the invoices whose subtotal is greater than 25 but less than 75. Show the details of the invoice who has the minimum subtotal. Show the codes and names of the vendors who supplied products. Using EXCEPT show...
PHP Question: Write the PHP code to list out all of the dates of the current...
PHP Question: Write the PHP code to list out all of the dates of the current month and assign them to their given days. As an example, for the month of October 2020, the output should look something like this: October 2020       Monday: 5, 12, 19, 26 Tuesday: 6, 13, 20, 27 Wednesday: 7, 14, 21, 28 Thursday: 1, 8, 15, 22, 29 Friday: 2, 9, 16, 23, 30 Saturday: 3, 10, 17, 24, 31 Sunday: 4, 11, 18,...
JAVA Using the java.util.Calendar class, create 3 dates and times. Write a method to identify and...
JAVA Using the java.util.Calendar class, create 3 dates and times. Write a method to identify and print out the oldest of the 3 timestamps. Likewise, create another method that prints out the most recent time.
Write the following questions as queries in SQL. Use only the operators discussed in class (no...
Write the following questions as queries in SQL. Use only the operators discussed in class (no outer joins) Consider the following database schema: INGREDIENT(ingredient-id,name,price-ounce) RECIPE(recipe-id,name,country,time) USES(rid,iid,quantity) where INGREDIENT lists ingredient information (id, name, and the price per ounce); RECIPE lists recipe information (id, name, country of origin, and time it takes to cook it); and USES tells us which ingredients (and how much of each) a recipe uses. The primary key of each table is underlined; rid is a foreign...
Write the following questions as queries in SQL. Use only the operators discussed in class (no...
Write the following questions as queries in SQL. Use only the operators discussed in class (no outer joins) Consider the following database schema: INGREDIENT(ingredient-id,name,price-ounce) RECIPE(recipe-id,name,country,time) USES(rid,iid,quantity) where INGREDIENT lists ingredient information (id, name, and the price per ounce); RECIPE lists recipe information (id, name, country of origin, and time it takes to cook it); and USES tells us which ingredients (and how much of each) a recipe uses. The primary key of each table is underlined; rid is a foreign...
Write SQL queries below for each of the following: List the names and cities of all...
Write SQL queries below for each of the following: List the names and cities of all customers List the different states the vendors come from (unique values only, no duplicates) Find the number of customers in California List product names and category descriptions for all products supplied by vendor Proformance List names of all employees who have sold to customer Rachel Patterson
Write and run SQL statements to complete the following tasks. Show customer 10014’s name and the...
Write and run SQL statements to complete the following tasks. Show customer 10014’s name and the product’s descriptions which he/she purchased and the number of units of each. Add a new attribute (column) engaged varchar(3) to the customer table and update the engaged attribute for the customers who have not generated any invoice to ‘No’. Task 2 should be completed in two steps i.e. two SQL commands. Sql file -- Creating Tables .headers on .mode column .separator , DROP TABLE...
Import the northwind database and write sql statements for the following: List all supplier ids (no...
Import the northwind database and write sql statements for the following: List all supplier ids (no duplicates) for all products. List the product name and supplier id for all products that cost more than $20. List all products whose names start with letter "c" and are not discontinued. List each country name and the number of suppliers located in the country. List all supplier names, the number of products that each supplier provides (this column should be named as NumOfProducts),...
1. Write the SQL code required to list the employee number, first and last name, middle...
1. Write the SQL code required to list the employee number, first and last name, middle initial, and the hire date. Sort your selection by the hire date, to display the newly hired employees first. 2. Modify the previous query and list the employee first, last name and middle initial as one column with the title EMP_NAME. Make sure the names are listed in the following format: First name, space, initial, space, last name (e.g. John T Doe). Hint: use...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT