{"id":2263,"date":"2022-08-02T05:01:40","date_gmt":"2022-08-02T05:01:40","guid":{"rendered":"https:\/\/codeinsightacademy.com\/blog\/?p=2263"},"modified":"2022-08-03T08:42:30","modified_gmt":"2022-08-03T08:42:30","slug":"sql-dql-test-1","status":"publish","type":"post","link":"https:\/\/codeinsightacademy.com\/blog\/sql\/sql-dql-test-1\/","title":{"rendered":"SQL DQL Test 1"},"content":{"rendered":"\n<ol><li>select employees in descending order &#8211; salary<\/li><li>select all employees from Mumbai<\/li><li>select all employees having salary more than average salary<\/li><li>select sum of salary from table<\/li><li>select all unique address<\/li><li>select details, salary from table<br>(details should be concatenation of name and address)<br><img loading=\"lazy\" width=\"465\" height=\"311\" class=\"wp-image-2284\" style=\"width: 250px;\" src=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2022\/08\/image-6.png\" alt=\"\"><\/li><li>select names of employees having max salary<\/li><li>select employees having 2nd max salary<\/li><li>count employees by address, order by employee count<br>e.g. select count(name,address) from employee<br><img loading=\"lazy\" width=\"436\" height=\"327\" class=\"wp-image-2269\" style=\"width: 250px;\" src=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2022\/08\/image-1.png\" alt=\"\"><\/li><li>show count of employees from <strong>nagpur<\/strong> only<\/li><li>select all employees whose names starts or ends with vowels<\/li><li>find employees having max salary in particular city<br><img loading=\"lazy\" width=\"674\" height=\"279\" class=\"wp-image-2273\" style=\"width: 500px;\" src=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2022\/08\/image-2.png\" alt=\"\"><\/li><li>select top 5 salaried employees<\/li><li>select 2<sup>nd<\/sup> highest salaried employees<br><img loading=\"lazy\" width=\"393\" height=\"171\" class=\"wp-image-2294\" style=\"width: 300px;\" src=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2022\/08\/image-7.png\" alt=\"\"><\/li><li>show cities having total salary more than 200000<\/li><li>Show all students who appeared for exam<br><img loading=\"lazy\" width=\"389\" height=\"238\" class=\"wp-image-2278\" style=\"width: 300px;\" src=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2022\/08\/image-3.png\" alt=\"\"><\/li><li>show student, subject and total marks of students whose total marks are more than 80<br><img loading=\"lazy\" width=\"615\" height=\"152\" class=\"wp-image-2282\" style=\"width: 400px;\" src=\"https:\/\/codeinsightacademy.com\/blog\/http:\/\/codeinsightacademy.com\/blog\/wp-content\/uploads\/2022\/08\/image-5.png\" alt=\"\"><\/li><\/ol>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>select employees in descending order &#8211; salary select all employees from Mumbai select all employees having salary more than average salary select sum of salary from table select all unique address select details, salary from table(details should be concatenation of name and address) select names of employees having max salary select employees having 2nd max [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[34],"tags":[],"_links":{"self":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/2263"}],"collection":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/comments?post=2263"}],"version-history":[{"count":15,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/2263\/revisions"}],"predecessor-version":[{"id":2296,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/2263\/revisions\/2296"}],"wp:attachment":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/media?parent=2263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/categories?post=2263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/tags?post=2263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}