Answer to Question #168881 in Databases | SQL | Oracle | MS Access for Chandra sena reddy

Question #168881

For all the videos, represent the number of views in multiples of thousands.

For example, if the number of views of a video is 17,200, it is represented as 17.2 in the output.

Note:

  • Sort the output in the descending order ofno_of_views_in_thousands, and then in the alphabetical order ofname



Table: video

video_id	name	duration_in_secs	published_datetime	no_of_views	   channelid
1000	Getting My 
         Driver's          3652           2011-12-05 19:00       10619        367
        |Lele Pons  

1001	Apple iPhone 
        X Review:          4556	         2021-01-19 20:12	    140012	      362
       The Best Yet!	

1002   Victoria Beckham
        Gives Strangers 
        Fashion Advice      836	         2021-01-19 20:12	    75609	      353
       for $2 in Central 
       Park | Vanity Fair	

1008	You, but in emojis.
        (YIAY #375)	         3874	     2021-01-19 20:12	    16469	      352

1009	100 People Hold 
       Their Breath for as   2885	     2015-05-17 19:32	    272102	      354
       Long as They Can	     

1010	Luke Bryan - Hooked
          On It (Audio)	     2106	     2016-02-10 12:32	    184471	      366

1011	The perfect ice - 
          Ice boats on       2549	     2020-07-10 15:32	    108047	      352
           Lake Geneva	

1012	5 Days Of Wearing 
        DIY Makeup | Try     3172	     2018-11-05 08:32	    178623	      358
       Living With Lucie 
        | Refinery29	

1013	Idiot's Guide to 
      Japanese Squat Toilets  709	     2009-08-05 11:32	    44293	      356

1014	UCLA men's basketball
         players discuss       661	     2017-04-17 17:32	    76223	      359
          arrests in China	

1015	Surprise After 
      Surprise | October Vlog  3288	     2012-08-07 11:32	    132277	      355

1016	Canada Soccer's Women's
          National Team v USA 
      International Friendly    1661	 2010-11-05 11:32	    239292	      356
      LIVE from Avaya Stadium, 
             San Jose	

1017	F The Prom (2017) 
       |Official Trailer HD	    3327	 2019-12-17 17:32	    51052	      359
 
1018	Walking while black	    2868	 2016-02-10 15:32	    281085	      352

1019	Vostok Brompton Beach 
                Ride	        2022	 2016-04-05 19:00	    204704	      367

1020	SHOPPING FOR NEW FISH!! 3496	 2021-01-19 20:12	    294429	      359

1021	Paramore: Fake Happy 
           [OFFICIAL VIDEO]	    1397	 2015-07-05 19:00	    245138	      368

1022	Howard Stern: George 
      Takei Talks About Harvey 
        Weinstein and Sexually  776	     2021-01-19 20:12	    35875	      360
                Assault	

1023	Tony Hawk Answers 
      Skateboarding Questions   4476	 2017-02-17 19:32	    143404	      354
           From Twitter |
        Tech Support | WIRED	

1024	Kimbra - Top of the 
        World (Official Music   3243	 2015-01-05 19:00	    220673	      368
               Video)	


Expected Output Format

video_id	name	no_of_views_in_thousands
   ...	     ...	         ...








1
Expert's answer
2021-03-07T18:41:59-0500

The required query are given below-

SELECT * FROM mydb.channel_traffic ORDER BY name,no_of_views asc;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS