Write a SQL statement to list the following information sort

Write a SQL statement to list the following information, sorted by descending order by total timespan Write a SQL statement to list the following information, sorted by descending order by total logging numbers. Show how to use upper, rtrim and ltrim functions in a select statement to select title and ssn information of all instructors with last name to be \"George\" to retrieve row 1 and row 3. Notice that although George has different upper case and lower ease combinations, we deem different spellings of \"George\" the same at conceptual level. (In this problem, in order to test out upper, rtrim and ltrim, we have to use char data type for both last name and first name fields! Pay attention to the upper ease and lower ease, and spaces in the table.)

Solution

//First create the table and then do insert operations to create the table_name1 given in the question. Then use the below command for your question.
12 Ans:- SELECT name,totaltimespan FROM table_name1 ORDER BY totaltimespan ASC

//First create the table and then do insert operations to create the table_name2 given in the question. Then use the below command for your question.
13 Ans :- SELECT name, totalloggingnumbers FROM table_name2 ORDER BY totalloggingnumbers DESC


//First create the table and then do insert operations to create the table_name3 given in the question. Then use the below command for your question.
14 Ans :- SELECT Title, Ssn FROM table_name3 WHERE LTRIM(RTRIM(UPPER(Last Name))) = \'GEORGE\'

 Write a SQL statement to list the following information, sorted by descending order by total timespan Write a SQL statement to list the following information,

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site