Question

Which of the following queries will return the first 10% of the records in the salary...

Which of the following queries will return the first 10% of the records in the salary table?

Question options:

select first 10% * from salary order by employee_id asc;

select percent(10) * from salary order by employee_id asc;

select top 10 % * from salary order by employee_id asc;

select top 10 percent * from salary order by employee_id asc;

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

Ans: select top 10 percent * from salary order by employee_id asc;

Explanation:

The correct syntax for selecting the top x % of the records in any table is:

SELECT TOP x PERCENT *

FROM Table_Name

WHERE condition;

Note : WHERE clause is optional.  

For example, selecting top 30% of the records in STUDENT table is:

SELECT TOP 30 PERCENT * FROM STUDENT;  

And all other options in the question will result in syntax errors.

Add a comment
Know the answer?
Add Answer to:
Which of the following queries will return the first 10% of the records in the salary...
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
  • Which of the following queries on table STUDENT will return three values as a result? STUDENT...

    Which of the following queries on table STUDENT will return three values as a result? STUDENT Observe the table STUDENT: STUDENT StudentID        SSN                  Name           Class D111              111-11-1111         Connor       Freshman D222              222-22-2222         Trevor         Freshman D333              333-33-3333         Connor       Sophomore D444              444-44-4444         Parker         Sophomore D555              555-55-5555         Connor       Sophomore Select one: a. SELECT name FROM student; b. SELECT class FROM student; c. SELECT DISTINCT name FROM student; d. SELECT name FROM student WHERE class != 'Sophomore';

  • Answer the following SQL study guide questions... Question 1 (1 point) Unless you assign a column...

    Answer the following SQL study guide questions... Question 1 (1 point) Unless you assign a column name in the base table. the column name in the result set is the same as the 1) unique syntax 2) column alias 3) qualification 4) all of the above Question 2 (1 point) Which clause specifies the number of rows that should be skipped before rows are returned from the result set? 1) FETCH 2) OFFSET 3) FIRST 4) NEXT Question 3 (1...

  • Write SQL queries to answer the following question: A. Which students are enrolled in Database and...

    Write SQL queries to answer the following question: A. Which students are enrolled in Database and Networking? (Hint: use SectionNo for each class, so that you can determine the answer from the Registration table by itself.) I have attempted the code below, but am receiving an error under the first SELECT, showing error code 1064, (syntax error) SELECT StudentName, StudentID FROM Student WHERE StudentID =(select StudentID FROM Registration WHERE (SectionNo=2714 OR SectionNo=2715) GROUP BY StudentID HAVING COUNT (*)>1;

  • 10-25. Write two HIVE queries, the first to create a PRODUCT table with fields ProdID, Name,...

    10-25. Write two HIVE queries, the first to create a PRODUCT table with fields ProdID, Name, Seller, Price; the sec- ond to load data into the table from file ProductInfo.csv. Make all necessary assumptions.

  • 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...

  • IN THE PREVIOUS CHAPTER WE MADE A DATABASE USING OUR LAST NAME AS ITS NAME. QUESTION...

    IN THE PREVIOUS CHAPTER WE MADE A DATABASE USING OUR LAST NAME AS ITS NAME. QUESTION 1 STATES THIS. PLEASE TYPE WHAT NEEDS TO BE TYPED FOR ALL STEPS. THIS USES CODIO a. 1. Connect to the database you created and named in Module One (for example, Jetson). Type after the prompt mysql> a. use (table you named); i. Example: mysql> use Jetson; 2. Create the Employee table using the SQL statement shown here. Press Return after each line. CREATE...

  • Which of the two following SELECT queries (a or b) of a geographic database is likely...

    Which of the two following SELECT queries (a or b) of a geographic database is likely to be fastest in execution? Explain why a. Select all households living within 10om of a railway line, then from this group select all those who do not have a motor car Select all households without a motor car, then from this group select all those living within 10om of a railway line b.

  • 1. Create a table that will hold the data in avgprice kwh state.csv. This .csv file...

    1. Create a table that will hold the data in avgprice kwh state.csv. This .csv file contains the annual data from 1990-2012 on the average energy price per kilowatt hour (KwH) by state and provider type. Implement the following queries: • Print each row that has Tennessee as state, order the result by year in descending order. • Print the average residential, commercial, industrial, and transportation price for the state of Texas from the year 1990-2012. 2. Create the tables...

  • Consider EMPLOYEE database. Create the database and run the following queries and write the result you...

    Consider EMPLOYEE database. Create the database and run the following queries and write the result you get. What would be the result of the following query (please create the resulting table will all the columns and rows)? SELECT                      D.Dname, E.Lname, P.Pname FROM                         DEPARTMENT D, EMPLOYEE E, WORKS_ON W, PROJECT P WHERE                      D.Dnumber=E.Dno AND E.Ssn=W.Essn AND W.Pno=P.Pnumber ORDER BY                 D.Dname DESC, E.Lname DESC;

  • QUESTION 9 You plan to query data using the TRANS_HIST_V view that was created by another...

    QUESTION 9 You plan to query data using the TRANS_HIST_V view that was created by another user in their schema. Which statement is true? A. The Oracle Server will retrieve the view definition from the ALL_VIEWS data dictionary view. B. The Oracle Server will retrieve data, determined by the query criteria, from the TRANS_HIST_V view. C. The Oracle Server will verify whether you have been granted access privileges to the TRANS_HIST_V view. D. The Oracle Server will automatically reset the...

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