Using SQL (access) Need SQL statements for the following 7. List the star number
ID: 3156087 • Letter: U
Question
Using SQL (access)Need SQL statements for the following
7. List the star number, star name, date of birth, and date of death for all stars in the database who are dead and who were born in 1930 or later. List the output with the most recently deceased shown first. Use DatePart(“yyyy”, STARBORN) to compare only the birthdate year.
8. List the movie titles that won Best Picture, but did not win the Best Director award. List the output in chronological order with the most recent winner first.
9. List the movie title of movies which grossed at least $400 million outside the United States (i.e. worldwide gross minus U.S. gross). Remember, the Gross columns are in the thousands of dollars (000 omitted).
10. Find the star number, name, date of birth, and current age of all stars who were born before January 1, 1925 and who are still living (i.e. STARDIED is null). DATE() returns today’s date 2 in yyyymmdd format. Calculate the age based on the current year (use DatePart on DATE()) minus year of birth.
Extra Credit: (3 points) Calculate the actual age based on the current month, day, year. For example, if I run your query today (4/12/2016) for a birth date of 4/15/1976, the actual age is 40. If I run the same query on 4/16/2016, the age is 41. Using SQL (access)
Need SQL statements for the following
7. List the star number, star name, date of birth, and date of death for all stars in the database who are dead and who were born in 1930 or later. List the output with the most recently deceased shown first. Use DatePart(“yyyy”, STARBORN) to compare only the birthdate year.
8. List the movie titles that won Best Picture, but did not win the Best Director award. List the output in chronological order with the most recent winner first.
9. List the movie title of movies which grossed at least $400 million outside the United States (i.e. worldwide gross minus U.S. gross). Remember, the Gross columns are in the thousands of dollars (000 omitted).
10. Find the star number, name, date of birth, and current age of all stars who were born before January 1, 1925 and who are still living (i.e. STARDIED is null). DATE() returns today’s date 2 in yyyymmdd format. Calculate the age based on the current year (use DatePart on DATE()) minus year of birth.
Extra Credit: (3 points) Calculate the actual age based on the current month, day, year. For example, if I run your query today (4/12/2016) for a birth date of 4/15/1976, the actual age is 40. If I run the same query on 4/16/2016, the age is 41. Using SQL (access)
Need SQL statements for the following
7. List the star number, star name, date of birth, and date of death for all stars in the database who are dead and who were born in 1930 or later. List the output with the most recently deceased shown first. Use DatePart(“yyyy”, STARBORN) to compare only the birthdate year.
8. List the movie titles that won Best Picture, but did not win the Best Director award. List the output in chronological order with the most recent winner first.
9. List the movie title of movies which grossed at least $400 million outside the United States (i.e. worldwide gross minus U.S. gross). Remember, the Gross columns are in the thousands of dollars (000 omitted).
10. Find the star number, name, date of birth, and current age of all stars who were born before January 1, 1925 and who are still living (i.e. STARDIED is null). DATE() returns today’s date 2 in yyyymmdd format. Calculate the age based on the current year (use DatePart on DATE()) minus year of birth.
Extra Credit: (3 points) Calculate the actual age based on the current month, day, year. For example, if I run your query today (4/12/2016) for a birth date of 4/15/1976, the actual age is 40. If I run the same query on 4/16/2016, the age is 41. 8. List the movie titles that won Best Picture, but did not win the Best Director award. List the output in chronological order with the most recent winner first.
9. List the movie title of movies which grossed at least $400 million outside the United States (i.e. worldwide gross minus U.S. gross). Remember, the Gross columns are in the thousands of dollars (000 omitted).
10. Find the star number, name, date of birth, and current age of all stars who were born before January 1, 1925 and who are still living (i.e. STARDIED is null). DATE() returns today’s date 2 in yyyymmdd format. Calculate the age based on the current year (use DatePart on DATE()) minus year of birth.
Extra Credit: (3 points) Calculate the actual age based on the current month, day, year. For example, if I run your query today (4/12/2016) for a birth date of 4/15/1976, the actual age is 40. If I run the same query on 4/16/2016, the age is 41.
Explanation / Answer
though the question is posted in the wrong section.
solution.
7) SELECT star number, star name, date of birth, and date of death FROM database(name of the table) WHERE stardied NE NULL OR starborn GE '19300101'(yyyymmdd format) ORDER BY stardied DESC.
8) SELECT movietitle FROM database WHERE best picture NE NULL AND best director EQ null.
9) SELECT movietitle FROM database WHERE worldwidegross - usgross GE 400000 .
10) SELECT starnumber, name, starborn , age as sydatum-starborn %365 FROM database WHERE starborn LE 19250101 and STARDIED NE null.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.