[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-763509-105":59,"doc-detail-763509-en":129,"doc-similar-763509":164},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":122,"head_meta":124,"extra_data":126,"updated_unix":128},105,"en","sql-practice-1-single-table-aggregation-and-group-by-database-queries-and-exercises","SQL Practice 1 - Single Table Aggregation and Group By - Database Queries and Exercises","","Comprehensive SQL practice document focusing on single-table queries, aggregation, and grouping operations. The material provides step-by-step query examples using sample relational database schemas including salesman, customer, and orders tables. Each exercise illustrates common SQL clauses such as SELECT, DISTINCT, and WHERE conditions, accompanied by expected tabular outputs and corresponding query syntax. Designed for learners and practitioners seeking to enhance their foundational database querying skills through practical examples and structured database management exercises.",{"@graph":69,"@context":121},[70,84,104],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/sql-practice-1-single-table-aggregation-and-group-by-database-queries-and-exercises/763509/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":98,"encodingFormat":97,"isAccessibleForFree":99,"interactionStatistic":100},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/sql-practice-1-single-table-aggregation-and-group-by-database-queries-and-exercises/763509.png","ImageObject",300,407,{"name":92,"@type":93},"Margaret","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-30",true,{"@type":101,"interactionType":102,"userInteractionCount":8},"InteractionCounter",{"@type":103},"ViewAction",{"@type":105,"mainEntity":106},"FAQPage",[107,113,117],{"name":108,"@type":109,"acceptedAnswer":110},"What topics are covered in this SQL practice document?","Question",{"text":111,"@type":112},"The document covers single-table queries, aggregation, and group by operations using sample database schemas.","Answer",{"name":114,"@type":109,"acceptedAnswer":115},"Where can additional SQL exercises from this collection be found?",{"text":116,"@type":112},"Additional exercises are available at the w3resource SQL exercises website linked in the document.",{"name":118,"@type":109,"acceptedAnswer":119},"How is filtering implemented in Query 4?",{"text":120,"@type":112},"Query 4 uses a WHERE clause to filter customer records with a grade equal to 200.","https://schema.org",{"og:url":83,"og:type":123,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":125,"canonical":83},"index,follow",{"doc_id":127,"site_id":62},763509,1796034078,{"code":4,"msg":5,"data":130},{"doc_id":127,"user_id":131,"nickname":92,"user_avatar":132,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":133,"file_id":134,"file_url":135,"file_type":136,"file_size":137,"view_count":8,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":138,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":128,"read_time":143,"preview_page_count":24,"preview_urls":144},137451207643,"https://ap-avatar.wpscdn.com/davatar_3d24733baf745e90a7e4bdd5f77d97b2","SQL Practice 1  \nOne table, Aggregation, Group By  \n24 Queries  \nLink: [https://www.w3resource.com/sql-exercises/](https://www.w3resource.com/sql-exercises/)  \nQuery 1  \n• Display name and commission of all the salesmen .  \nQuery 1  \n• Display name and commission for all the salesmen .  \nname  \nJames Hoog Nail Knite Pit Alex Mc Lyon Paul Adam Lauson Hen  \ncommission  \n0.15 0.13 0.11 0.14 0.13  \n0.12  \nSELECT name, commission FROM salesman;  \nQuery 2  \n• Retrieve salesman id of all salesmen from orders table without any repeats .  \nQuery 2  \n• Retrieve salesman id of all salesmen from orders table without any repeats .  \nsalesman id 5002 5003 5006 5001 5005 5007  \nSELECT DISTINCT salesman_id FROM orders;  \nQuery 3  \n• Display names and city of salesman, who belongs to the city of Paris .  \nQuery 3  \n• Display names and city of salesman, who belongs to the city of Paris .  \nname city  \nNail Knite Paris  \nMc Lyon Paris  \nSELECT name,city FROM salesman WHERE city='Paris';  \nQuery 4  \n• Display all the information for those customers with a grade of 200.  \ncustomer id cust name city grade salesman id  \n3007 Brad Davis New York 200 5001  \n3005 Graham Zusi California 200 5002  \n3003 Jozy Altidor Moscow 200 5007  \nSELECT *  \nFROM customer WHERE grade = 200;  \nQuery 5  \n• Display the order number, order date and the purchase amount for order(s) which will be delivered by the salesman with ID 5001 .  \n\n| ord no | ord date | purch amt |\n| --- | --- | --- |\n| _ | _ | _ |\n| 70002 | 2012-10-05 | 65.26 |\n| 70005 | 2012-07-27 | 2400.60 |\n| 70008 | 2012-09-10 | 5760.00 |\n| 70013 | 2012-04-25 | 3045.60 |\n\nSELECT ord_no, ord_date, purch_amt FROM orders  \nWHERE salesman_id = 5001;","cbCaikvMasRWoNi0","https://ap.wps.com/l/cbCaikvMasRWoNi0","pdf",4077118,44,"English","# SQL Practice Overview\n## Query Examples and Syntax\n## Salesman and Customer Data Retrieval","[{\"question\":\"What topics are covered in this SQL practice document?\",\"answer\":\"The document covers single-table queries, aggregation, and group by operations using sample database schemas.\"},{\"question\":\"Where can additional SQL exercises from this collection be found?\",\"answer\":\"Additional exercises are available at the w3resource SQL exercises website linked in the document.\"},{\"question\":\"How is filtering implemented in Query 4?\",\"answer\":\"Query 4 uses a WHERE clause to filter customer records with a grade equal to 200.\"}]","SQL Practice 1 - Single Table Aggregation and Group By - Database Queries and Exercises | PDF",111,[145,149,153,157,161],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-30/f9352a0e76b1da88c6b5afebffe243d4.webp",983,759,{"page_no":14,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-30/3312efe9a549d7288f4f0d2a4abec094.webp",982,758,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-30/6e9b74f97e8cac1fddaf1e9a81c2192a.webp",981,757,{"page_no":19,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-30/dd93c4ccfbdbd9e6a6ba78dce75ddb5d.webp",980,756,{"page_no":24,"url":162,"width":163,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-30/d5cac08e28ba6b79165c2ca100c1b0ad.webp",979,{"list":165,"token":66},[166,172,178,184,190,196,202,208,215,221],{"doc_id":167,"doc_title":168,"file_type":136,"home_preview_img_url":169,"slug":170,"view_count":24,"category_name":30,"create_tm":171},692253,"Learning SQL - Second Edition - Learn SQL","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003050088/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=CIvIMUHCxH8xi%2FNJpo%2BOPhEsvZU%3D","learning-sql-second-edition-learn-sql",1794187815,{"doc_id":173,"doc_title":174,"file_type":136,"home_preview_img_url":175,"slug":176,"view_count":39,"category_name":30,"create_tm":177},656141,"A Visual Introductionto SQL - by J. Harvey Trimble Jr. and David Chappell","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974785931/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=dsJNOfnFKHt%2BxjDeLaTUB42XdoM%3D","a-visual-introductionto-sql-by-j-harvey-trimble-jr-and-david-chappell",1792966697,{"doc_id":179,"doc_title":180,"file_type":136,"home_preview_img_url":181,"slug":182,"view_count":19,"category_name":30,"create_tm":183},692258,"SQL - Quick Guide - SQL Basics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003050421/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=ue01YSkul3m6hPtvlkAsxGcdvYk%3D","sql-quick-guide-sql-basics",1794187831,{"doc_id":185,"doc_title":186,"file_type":136,"home_preview_img_url":187,"slug":188,"view_count":34,"category_name":30,"create_tm":189},656119,"EMS SQL Query - Powerful tool for advanced SQL query building","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974785307/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=smBGmCoTsGpHzDpB%2BtPMwyWO9EY%3D","ems-sql-query-powerful-tool-for-advanced-sql-query-building",1792966480,{"doc_id":191,"doc_title":192,"file_type":136,"home_preview_img_url":193,"slug":194,"view_count":34,"category_name":30,"create_tm":195},673515,"SQL - Third Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229990906917/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=ckzMpyQcSbqdqDM5WmguYOfEKFc%3D","sql-third-edition",1793647479,{"doc_id":197,"doc_title":198,"file_type":136,"home_preview_img_url":199,"slug":200,"view_count":81,"category_name":30,"create_tm":201},701375,"Database Management Systems - Part - Basics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012296572/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=bNBw960611sfRmcxryQwe91RKlU%3D","database-management-systems-part-basics",1794528042,{"doc_id":203,"doc_title":204,"file_type":136,"home_preview_img_url":205,"slug":206,"view_count":39,"category_name":30,"create_tm":207},656142,"01-HoffmanSQL - Introduction to Structured Query Language - Version 4.66","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974785935/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=OM6BaxRrsspHbovTS8QS5ZQX89k%3D","01-hoffmansql-introduction-to-structured-query-language-version-466",1792966698,{"doc_id":209,"doc_title":210,"file_type":136,"home_preview_img_url":211,"slug":212,"view_count":213,"category_name":30,"create_tm":214},129533,"Mastering Django ORM - Performance Tuning and Advanced Query Optimization - Afsal MS","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229842235832/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=ZVcKZPfxjIEbdVXpOgPjBKN%2FgWQ%3D","mastering-django-orm-performance-tuning-and-advanced-query-optimization-afsal-ms",23,1786106438,{"doc_id":216,"doc_title":217,"file_type":136,"home_preview_img_url":218,"slug":219,"view_count":81,"category_name":30,"create_tm":220},701374,"DATABASE SYSTEMS - The Complete Book - Second Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012296412/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=vIQeB3laQCsG4n2ZQQGz7QrGc%2Fk%3D","database-systems-the-complete-book-second-edition",1794528038,{"doc_id":222,"doc_title":223,"file_type":136,"home_preview_img_url":224,"slug":225,"view_count":14,"category_name":30,"create_tm":226},763505,"Practical SQL - A Beginner’s Guide to Storytelling with Data","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230047154823/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=17K1I%2B7wImPhXF%2FgUkwZ6hL9oAo%3D","practical-sql-a-beginners-guide-to-storytelling-with-data",1796034070]