Question

Which SQL statement retrieves the EmployeeName and City columns from the Employees table? O LIST EmployeeName, City ON Employ

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Question 1:

Answer :SELECT EmployeeName,City FROM Employees;

Explanation :

  • This SQL query will get the employee name and city from employees tables
  • LIST , FIND,RETRIEVE are all invalid keywords.

*****************************

Question 2:

Answer :SELECT DISTINCT city FROM natlpark ORDER BY city;

Explanation :

  • This SQL query will get the unique city without duplicate from natipark table.
  • Here distinct will get the unique records.

*****************************

Question 3:

Answer :ORDER BY

Explanation :

  • In SQL order by is used to sort the records
  • group by is used to group the records
  • SORT results and index by are invalid,

*****************************

Question 4:

Answer :It is not necessary to know the values in the column in advance

Explanation :When what values are present in the columns are not known even when counting can be done in advance and as required records can be sorted by using order by as and when needed.

*****************************

Question 5:

Answer :SELECT t1.*,t2.* FROM t1 INNER JOIN t2 ON t1.i1=t2.i2;

Explanation :

  • INNER join in SQL used to join the two tables and will return the matching row based on some condition.
  • Right join will return all rows from right table and matching rows from left table
  • Left join will return all rows from left table and matching rows from right table

*****************************

Add a comment
Know the answer?
Add Answer to:
Which SQL statement retrieves the EmployeeName and City columns from the Employees table? O LIST EmployeeName,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • QUESTION 21 Complete the table below by matching each definition with the appropriate SQL clause. -A.B.C.D.E.F.G.H.I.J.K.L.M.N....

    QUESTION 21 Complete the table below by matching each definition with the appropriate SQL clause. -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A mandatory clause that is at the start of all SQL retrieval queries -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A clause used to return only the values in a result table that are unique -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A clause used to filter tuples according to some condition or predicate, like selection in relational algebra -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A clause that is used to list the tables and any joins required in a query...

  • SQL query: Write a SQL statement using the employees table and retrieve employees whose monthly salary...

    SQL query: Write a SQL statement using the employees table and retrieve employees whose monthly salary (including their commission) is greater or equal to 5,000 but less than or equal to 17,000 (we are assuming the salary on the table is monthly). In other words, if their monthly salary was 1000 and their commission was .2, their total monthly salary would be 1200 and given the criteria above this instance would not be selected. Please display the full name of...

  • Database in using Employees table given able Write a SELECT statement to get employees first name...

    Database in using Employees table given able Write a SELECT statement to get employees first name and starts with "A" 25). Write a SQL code for the following inquiries us reccords in the employees table where Write a SELECT statement to count the number of r lastname starts with "C" question "B" 2) If you have to write a SOL code to ioin between EMPLOY e will you join on? Provide the column name. ) I which col

  • 1 - Which of the following allows you to create subtotals in the output from a...

    1 - Which of the following allows you to create subtotals in the output from a SELECT statement? Group of answer choices _ SUBTOTAL _ ORDER BY _ HAVING _ GROUP BY 2 - A query includes grouping done using the AVG, SUM, COUNT, MIN, or MAX function. Which SQL keyword is used to select rows after this grouping has been done? Group of answer choices _ WHERE _ DISTINCT _ HAVING _ LIKE 3 - Which of the following...

  • Here is my SQL statement that I am trying to run in order to pull employees...

    Here is my SQL statement that I am trying to run in order to pull employees who were born in 1963, however I'm stumped on how to get it to be ran as ONLY the year 1963, any help would be awesome. SELECT   FirstName, LastName, BirthDate FROM   Employees GROUP BY BirthDate, FirstName, LastName;

  • The following SQL query returns one row per surgeon. The granularity before GROUP BY is a surgeon-panel combination, in...

    The following SQL query returns one row per surgeon. The granularity before GROUP BY is a surgeon-panel combination, in other words, for each surgeon, one panel they performed in. Surgeons can only be listed once per panel, but a log can have more than one panel. SELECT staff.STAFF_NM_WID "surgeon", COUNT( orl.LOG_ID ) "Number of Logs" FROM OR_LOG orl INNER JOIN V_LOG_STAFF staff ON orl.LOG_ID = staff.LOG_ID INNER JOIN OR_LOG_ALL_PROCS procs ON orl.LOG_ID = procs.LOG_ID AND procs.LINE = 1 --First Listed...

  • WRITE A SQL QUERY SQL SERVER Write a SELECT statement that returns one column from the...

    WRITE A SQL QUERY SQL SERVER Write a SELECT statement that returns one column from the Customers table named FullName that joins the LastName and FirstName columns. --       Format this column with the last name, a comma, a space, and the first name like this: --       Doe, John --       Sort the result set by last name in ascending sequence. --       Return only the contacts whose last name begins with a letter from M to Z. --  ...

  • I'm making a Report in SQL and need to add Release_Year which is in the Film...

    I'm making a Report in SQL and need to add Release_Year which is in the Film table in this query, how can I do that? Thank You Select Title, count(Rental_ID) as Rentals, (rental_rate*Count(rental_id)) As Revenue From Film join Inventory on Film.Film_ID = Inventory.Film_ID join rental on rental.inventory_id = inventory.inventory_id Group By Title Order By Revenue Desc

  • Top of Form Q1 Which of the following is a valid aggregate function in SQL? Check...

    Top of Form Q1 Which of the following is a valid aggregate function in SQL? Check only those that apply. Question 1 options: AVG LEAST COUNT MIN MOST SUM Q2 Which of the following aggregate functions will only operate on a numeric value expression? Check only those that apply: Question 2 options: MIN MAX AVG COUNT SUM Q3 When applying DISTINCT to the value being calculated in an aggregate function like COUNT, what is the effect? SELECT COUNT(DISTINCT StreetName) FROM...

  • MYSQL Applied Database I just want to make sure that the syntax looks okay for my...

    MYSQL Applied Database I just want to make sure that the syntax looks okay for my database SQL statements, any help would be much appreciated: 1.A query that asks for customer star review for Tony Stark on Opportunity Detail. SELECT CONCAT (employee_first_name,' ',employee_last_name) AS                            employee_name, review_star_count, FROM customer_reviews, JOIN e employees ON employee_id =employee_id, WHERE employee_id=4 AND opportunity_id=1; 2.A query that shows how many orders Additional Dot Twain License, in an order totaling over $900. SELECT product_name, COUNT(o.OrderID) AS...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT