[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-572125-105":53,"doc-detail-572125-en":127},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","sql-cheat-sheet-data-query-basics-to-aggregation","SQL Cheat Sheet - Data Query Basics to Aggregation","","SQL Cheat Sheet by Tomi Mester provides a structured, printable reference for learning and practicing SQL. It begins with base queries like selecting all rows or limiting results, then covers selecting specific columns, SQL data types, and filtering using WHERE with comparison operators, LIKE, and IN. It also explains logical operators for multiple conditions, proper query formatting, sorting with ORDER BY, retrieving unique values with DISTINCT, and core aggregation functions including COUNT, SUM, AVG, MIN, and MAX.",{"@graph":63,"@context":119},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/sql-cheat-sheet-data-query-basics-to-aggregation/572125/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/sql-cheat-sheet-data-query-basics-to-aggregation/572125.png","ImageObject",442,249,{"name":88,"@type":89},"sagouaw","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-22","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",6,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"What does SELECT * FROM table_name; return in this cheat sheet?","Question",{"text":109,"@type":110},"It returns every column and every row from the table named table_name.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"How do you filter rows using the WHERE clause?",{"text":114,"@type":110},"Use expressions like WHERE column1 = 'expression' or operators such as >=, LIKE '%pattern%', and IN ('exp1','exp2','exp3').",{"name":116,"@type":107,"acceptedAnswer":117},"Which aggregate functions are highlighted for data analysts/scientists?",{"text":118,"@type":110},"The cheat sheet lists COUNT(), SUM(), AVG(), MIN(), and MAX(), with example queries showing how to use them with WHERE filters.","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},572125,1792272672,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":15,"language":136,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":61,"update_tm":140,"read_time":79},3985747862151,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","SQL  \nCHEAT SHEET  \ncreated by Tomi Mester  \nI originally created this cheat sheet for my SQL course and workshop participants.* But I have decided to open-source it and make it available for everyone who wants to learn SQL.  \nIt's designed to give you a meaningful structure but also to let you add your own notes (that's why the empty boxes are there) . It starts from the absolute basics (SELECT * FROM table_name;) and guides you to the intermediate level (JOIN, HAVING, subqueries) . I added everything that you will need as a data analyst/ scientist.  \nThe ideal use case of this cheat sheet is that you print it in color and keep it next to you while you are learning and practicing SQL on your computer.  \nEnjoy!  \nCheers,  \nTomi Mester  \n*The workshops and courses I mentioned:  \nOnline SQL tutorial (free): [data36.com/sql-tutorial](data36.com/sql-tutorial)  \nLive SQL workshop: [data36.com/sql-workshop](data36.com/sql-workshop)  \nPractice SQL-an online SQL course for practicing: [data36.com/practice-sql](data36.com/practice-sql)  \n SQL CHEAT SHEET  \nBASE QUERY  \nSELECT * FROM table_name;  \nThis query returns every column and every row of the table called table_name.  \nSELECT * FROM table_name LIMIT 10;  \nIt returns every column and the first 10 rows from table_name.  \nSELECTING SPECIFIC COLUMNS  \nSELECT column1, column2, column3 FROM table_name;  \nThis query returns every row of column1, column2 and column3 from table_name.  \n[your notes]  \nDATA TYPES IN SQL  \nIn SQL we have more than 40 different data types. But these seven are the most important ones:  \n1. Integer. A whole number without a fractional part. E.g. 1, 156, 2012412  \n2. Decimal. A number with a fractional part. E.g. 3.14, 3.141592654, 961.1241250  \n3. Boolean. A binary value. It can be either TRUE or FALSE.  \n4. Date. Speaks for itself. You can also choose the format. E.g. 2017-12-31  \n5. Time. You can decide the format of this, as well. E.g. 23:59:59  \n6. Timestamp. The date and the time together. E.g. 2017-12-31 23:59:59  \n7. Text. This is the most general data type. But it can be alphabetical letters only, or a mix of letters and numbers and any other characters. E.g. hello, R2D2, Tomi, [124.56.128.41](124.56.128.41)  \nCREATED BY TOMI MESTER | DATA36.COM 1  \n SQL CHEAT SHEET  \nFILTERING (the WHERE CLAUSE)  \nSELECT * FROM table_name WHERE column1 = 'expression';  \n\"Horizontal filtering. \" This query returns every column from table_name-but only those rows where the value in column1 is 'expression' . Obviously this can be something other than text: a number (integer or decimal), date or any other data format, too.  \nADVANCED FILTERING  \nComparison operators help you compare two values. (Usually a value that you define in your query and values that exist in your SQL table.) Mostly, they are mathematical symbols, with a few exceptions:  \nComparison operator  \n=  \nWhat does it mean?  \nEqual to  \n\n| \u003C> | Not equal to |\n| --- | --- |\n| != | Not equal to |\n| \u003C | Less than |\n| \u003C= | Less than or equal to |\n| > | Greater than |\n| >= | Greater than or equal to |\n| LIKE ‘%expression%’ | Contains ‘expression’ |\n\nIN (‘exp1’, ‘exp2’, ‘exp3’)  \nContains any of ‘exp1’, ‘exp2’, or ‘exp3’  \nCREATED BY TOMI MESTER | DATA36.COM 2  \n SQL CHEAT SHEET  \nA few examples:  \nSELECT * FROM table_name WHERE column1 != 'expression';  \nThis query returns every column from table_name, but only those rows where the value in column1 is NOT 'expression' .  \nSELECT * FROM table_name WHERE column2 >= 10;  \nIt returns every column from table_name, but only those rows where the value in column2 is greater or equal to 10.  \nSELECT * FROM table_name WHERE column3 LIKE ‘%xzy%’;  \nIt returns every column from table_name, but only those rows where the value in column3 contains the 'xyz' string.  \nMULTIPLE CONDITIONS  \nYou can use more than one condition to filter. For that, we have two logical operators: OR, AND.  \nSELECT * FROM table_name WHERE column1 != ‘expression’ AND column3 LIKE‘%xzy%’;  \nThis query ","cbCaihvHWvp3jtAa","https://ap.wps.com/l/cbCaihvHWvp3jtAa","pdf",3683320,"English","# BASE QUERY\n# SELECTING SPECIFIC COLUMNS\n# DATA TYPES IN SQL\n# FILTERING (the WHERE CLAUSE)\n# ADVANCED FILTERING\n## Comparison operators\n## IN clause\n# MULTIPLE CONDITIONS\n# PROPER FORMATTING\n# SORTING VALUES\n# UNIQUE VALUES\n# CORRECT KEYWORD ORDER\n# SQL FUNCTIONS FOR AGGREGATION","[{\"question\":\"What does SELECT * FROM table_name; return in this cheat sheet?\",\"answer\":\"It returns every column and every row from the table named table_name.\"},{\"question\":\"How do you filter rows using the WHERE clause?\",\"answer\":\"Use expressions like WHERE column1 = 'expression' or operators such as \\u003e=, LIKE '%pattern%', and IN ('exp1','exp2','exp3').\"},{\"question\":\"Which aggregate functions are highlighted for data analysts/scientists?\",\"answer\":\"The cheat sheet lists COUNT(), SUM(), AVG(), MIN(), and MAX(), with example queries showing how to use them with WHERE filters.\"}]","SQL Cheat Sheet - Data Query Basics to Aggregation | PDF",1791925681]