[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-572124-105":53,"doc-detail-572124-en":126},{"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":119,"head_meta":121,"extra_data":123,"updated_unix":125},105,"en","sql-cheat-sheet-read-online-free","SQL Cheat Sheet - read online free","","SQL Cheat Sheet provides a compact reference for writing practical SQL statements. It covers basic SELECT filtering with WHERE, grouping and aggregation using GROUP BY and HAVING, and result ordering via ORDER BY. It summarizes data modification with UPDATE and INSERT, explains how VIEWs are created, and outlines common JOIN types plus join-based update patterns. It also includes semi-joins, index guidance, utility functions (TO_DATE, STR_TO_DATE, COALESCE, CURRENT_TIMESTAMP), set operations (UNION/EXCEPT/INTERSECT), and reporting-focused aggregation tips.",{"@graph":63,"@context":118},[64,80,101],{"@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":51,"@type":70,"position":76},"https://docshare.wps.com/template/general/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/sql-cheat-sheet-read-online-free/572124/",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-read-online-free/572124.png","ImageObject",442,249,{"name":88,"@type":89},"aboduw","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":47},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"How do I filter rows and columns in a basic SELECT query?","Question",{"text":108,"@type":109},"Use a WHERE clause to filter rows (e.g., col4 = 1 AND col5 = 2) and select specific columns in the SELECT list (col1, col2, ...).","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"What are common ways to combine tables in SQL?",{"text":113,"@type":109},"Use JOINs such as LEFT OUTER JOIN (all rows from table A), INNER JOIN (rows existing in both tables), and RIGHT OUTER JOIN (all rows from table B).",{"name":115,"@type":106,"acceptedAnswer":116},"When should I create indexes and what should I avoid?",{"text":117,"@type":109},"If you query by a column, create an index (e.g., CREATE INDEX ... ON table1 (col1)). Avoid overlapping indexes, avoid indexing on too many columns, and note that indexes can speed up DELETE and UPDATE operations.","https://schema.org",{"og:url":78,"og:type":120,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":122,"canonical":78},"index,follow",{"doc_id":124,"site_id":56},572124,1792164793,{"code":4,"msg":5,"data":127},{"doc_id":124,"user_id":128,"nickname":88,"user_avatar":129,"doc_module":9,"category_id":50,"category_name":51,"doc_title":59,"doc_description":61,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":47,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":9,"language":135,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":136,"faqs":137,"seo_title":138,"seo_description":61,"update_tm":139,"read_time":4},3985747862266,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","SQL Cheat Sheet  \nBasic Queries  \n• filter your columns  \nSELECT col1, col2, col3, ... FROM table1  \n• filter the rows  \nWHERE col4 = 1 AND col5 = 2  \n• aggregate the data GROUP by…  \n• limit aggregated data HAVING count(*) > 1  \n• order of the results ORDER BY col2  \nUSEFUL KEYWORDS FOR SELECTS:  \nDISTINCT-return unique results  \nBETWEEN a AND b-limit the range, the values can be numbers, text, or dates  \nLIKE-pattern search within the column text  \nIN (a, b, c) -check if the value is contained among given.  \nData Modification  \n• update specific data with the WHERE clause UPDATE table1 SET col1 = 1 WHERE col2 = 2  \n• insert values manually  \nINSERT INTO table1 (ID, FIRST_NAME, LAST_NAME) VALUES (1,‘Rebel’,‘Labs’);  \n• or by using the results of a query  \nINSERT INTO table1 (ID, FIRST_NAME, LAST_NAME) SELECT id, last_name, first_name FROM table2  \nViews  \nA VIEW is a virtual table, which is a result of a query.  \nThey can be used to create virtual tables of complex queries.  \nCREATE VIEW view1 AS SELECT col1, col2 FROM table1  \nWHERE    \nThe Joy of JOINs  \nLEFT OUTER JOIN-all rows from table A, even if they do not exist in table B  \nINNER JOIN-fetch the results that exist in both tables  \nRIGHT OUTER JOIN-all rows from table B, even if they do not exist in table A  \nUpdates on JOINed Queries  \nYou can use JOINs in your UPDATEs UPDATE t1 SET a = 1  \nFROM table1 t1[JOIN](JOIN table2 t2 ONt1.id = t2.t1_id)[ table2 t2](JOIN table2 t2 ONt1.id = t2.t1_id)[ ON](JOIN table2 t2 ONt1.id = t2.t1_id)[t1.id = t2.t1_id](JOIN table2 t2 ONt1.id = t2.t1_id)[ ](JOIN table2 t2 ONt1.id = t2.t1_id)[WHERE](WHERE t1.col1 = 0 AND t2.col2 IS NULL)[ t1.col1 = 0](WHERE t1.col1 = 0 AND t2.col2 IS NULL)[ AND](WHERE t1.col1 = 0 AND t2.col2 IS NULL)[ t2.col2](WHERE t1.col1 = 0 AND t2.col2 IS NULL)[ IS NULL](WHERE t1.col1 = 0 AND t2.col2 IS NULL);  \nNB! Use database specific syntax, it might be faster!  \nSemi JOINs  \nYou can use subqueries instead of JOINs:  \nSELECT col1, col2 FROM table1 WHERE id IN  \n(SELECT t1_id FROM table2 WHERE date > CURRENT_TIMESTAMP)  \nIndexes  \nIf you query by a column, index it!  \nCREATE INDEX index1 ON table1 (col1)  \nUseful Utility Functions  \n• convert strings to dates:  \nTO_DATE (Oracle, PostgreSQL), STR_TO_DATE (MySQL)  \n• return the first non-NULL argument: COALESCE (col1, col2,“default value”)  \n• return current time:  \nCURRENT_TIMESTAMP  \n• compute set operations on two result sets SELECT col1, col2 FROM table1  \nUNION / EXCEPT / INTERSECT  \nSELECT col3, col4 FROM table2;  \nUnion-returns data from both queries  \nExcept-rows from the first query that are not present in the second query  \nIntersect-rows that are returned from both queries  \nReporting  \nUse aggregation functions  \nDON’T FORGET:  \nAvoid overlapping indexes  \nAvoid indexing on too many columns  \nIndexes can speed up DELETE and UPDATE operation  \nCOUNT-return the number of rows SUM-cumulate the values  \nAVG-return the average for the group MIN / MAX-smallest / largest value  \n[www.jrebel.com](www.jrebel.com)","cbCainn6rQONiY2P","https://ap.wps.com/l/cbCainn6rQONiY2P","pdf",185293,"English","# Basic Queries\n## Useful keywords for SELECTs\n# Data Modification\n# Views\n# The Joy of JOINs\n## Updates on JOINed Queries\n# Semi JOINs\n# Indexes\n# Useful Utility Functions\n# Reporting","[{\"question\":\"How do I filter rows and columns in a basic SELECT query?\",\"answer\":\"Use a WHERE clause to filter rows (e.g., col4 = 1 AND col5 = 2) and select specific columns in the SELECT list (col1, col2, ...).\"},{\"question\":\"What are common ways to combine tables in SQL?\",\"answer\":\"Use JOINs such as LEFT OUTER JOIN (all rows from table A), INNER JOIN (rows existing in both tables), and RIGHT OUTER JOIN (all rows from table B).\"},{\"question\":\"When should I create indexes and what should I avoid?\",\"answer\":\"If you query by a column, create an index (e.g., CREATE INDEX ... ON table1 (col1)). Avoid overlapping indexes, avoid indexing on too many columns, and note that indexes can speed up DELETE and UPDATE operations.\"}]","SQL Cheat Sheet - read online free | PDF",1791925680]