[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-692256-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-692256-en":130,"doc-similar-692256":158},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","cancer-analysis-system-cas-guidance-getting-started-with-sql-and-extracting-data","Cancer Analysis System (CAS) Guidance - Getting started with SQL and extracting data","","Cancer Analysis System (CAS) guidance for new analysts using an Oracle database to store and analyse cancer registration data and related datasets for England and Wales. It explains CAS purpose, navigation, and prerequisites for loading data, including validating data types against the provided schema and adjusting schema, table names, and SQL dialect for Oracle 11g. It then teaches foundational SQL query writing: SELECT and FROM, filtering with WHERE, ordering, counting, grouping, aggregates, DISTINCT, CASE statements, joins, subqueries, and additional advanced functions with practical exercises.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/cancer-analysis-system-cas-guidance-getting-started-with-sql-and-extracting-data/692256/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/cancer-analysis-system-cas-guidance-getting-started-with-sql-and-extracting-data/692256.png","ImageObject",300,407,{"name":42,"@type":43},"ahduag","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-24","2026-11-09",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What is the Cancer Analysis System (CAS) used for?","Question",{"text":62,"@type":63},"CAS is used by the National Cancer Registration and Analysis Service to store and analyse cancer registration data and other linked datasets for England and Wales. It provides a central standardised system for combining regional data.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"What checks should be done after loading the data?",{"text":67,"@type":63},"Verify that data has loaded correctly, especially comparing loaded data types against those defined in the provided schema. Adjust schema and table names and modify SQL functions if your dialect differs from Oracle 11g.",{"name":69,"@type":60,"acceptedAnswer":70},"How do you write a basic SQL query in CAS?",{"text":71,"@type":63},"Use the SELECT statement to choose fields, the FROM clause to specify the table, and optionally a WHERE clause to filter results. End each query with a semi-colon (;) and run it in your database environment to view the Query Result window.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},692256,1794187826,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":33,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":79,"read_time":144,"preview_page_count":30,"preview_urls":145},3985747870414,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","National Cancer Registration and Analysis Service’s Cancer Analysis System (CAS) Guidance  \nGetting started with SQL and extracting data  \nLora Frayling and Cong Chen based on a guide by Victoria Coupland and Casey Dunlop  \nContents  \nIntroduction 3  \nLoading the Data 4  \nWriting basic SQL queries 5  \n1. Select and From 5  \n2. Where 6  \n3. Ordering 8  \n4. Counting 9  \n5. Counting in groups 10  \n6. Other aggregate functions (avg, min, max) 10  \n7. Distinct 11  \n8. Case statements 12  \n9. Linking and joining tables 13  \n10. Subqueries 15  \n11. More advanced functions 18  \nOther Useful Tips 21  \nIntroduction  \nThe Cancer Analysis System (CAS) was created and is used by the National Cancer Registration and Analysis Service (NCRAS) to store and analyse cancer registration data and other linked datasets for England and Wales. It was created in 2012 to combine cancer registration data for multiple regions into one central standardised system.  \nCAS is an Oracle database that uses SQL queries to access our datasets. This guidance has been developed to help new analysts to navigate around the system, write basic SQL queries, and use their own file space. You should aim to work through this document and carry out the tasks outlined to help get to know the system. This guide is designed to be used alongside other CAS guidance documents which can be found on the SVN and in the main NCRAS folder. \u003C\u003Cadd link>>  \nTo learn more about this type of database management system and how to use SQL there are many free online tools to use such as Code Academy, W3Schools and Khan Academy. If you’re part of the NCRAS team, an external SQL training course is also available. To find out more about this talk with your line manager.  \nIf you have any questions or notice any errors in this document, please contact Victoria.Coupland@PHE.GOV. UK.  \nLoading the data  \nPlease check that the data has been loaded correctly, in particular please check data types of the loaded data against those recorded in the schema provided.  \nThe data types and SQL provided are tailored for the Oracle 11g database on which the CAS sits, you will need to modify schemata and table names described to match those for your data. You may also need to adjust some of the SQL functions to match your dialect.  \nWriting basic SQL queries  \nA brief introduction to SQL  \nAn SQL query is a set of instructions or commands to get the data you want out of a database. Most basic queries are structured in the same way:  \n􀁸 What data do you want? (SELECT statement)  \n􀁸 Where does the data come from? (FROM clause)  \n􀁸 What criteria do you want to filter the data by? (WHERE clause)  \n􀁸 How do you want to group or order it? (GROUP BY and ORDER BY clauses)  \n1. Select and From  \nFirstly, what data do you want from your table? To ask to see everything in a table you can use the SELECT statement followed by an asterisk (*) . Using the * is useful for exploring what data is within a table and how it’s structured.  \nNext , where does the data come from? You then need to specify where the data should be retrieved from using a FROM clause. In the example below we’ve specified the data should come from SIM_SIM_AV_TUMOUR table which is found in the schema SIMULACRUM.  \nEvery query must be ended with a semi-colon (;) .  \nSELECT *  \nFROM SIMULACRUM.SIM_AV_TUMOUR;  \nCopy and paste the query above into a tab for your database. Then press the green arrow button (or press Ctrl + return while your cursor is inside the query) to run the SQL. The Query Result window should appear when the query has  \nsuccessfully run. This should be showing the entire SIM_AV_TUMOUR table.  \ni. Next, instead of selecting everything with * , try specifying some field names. You won’t always want to see all the columns, specifying the field names shows you only what you’d like to see. Copy and paste the below into the worksheet (and delete the previous query) . Here we’re selecting the diagnosis date and the cancer site field from the sa","cbCaifJZ8r3WD03R","https://ap.wps.com/l/cbCaifJZ8r3WD03R","pdf",258042,23,"English","# Introduction\n# Loading the Data\n# Writing basic SQL queries\n## Select and From\n## Where","[{\"question\":\"What is the Cancer Analysis System (CAS) used for?\",\"answer\":\"CAS is used by the National Cancer Registration and Analysis Service to store and analyse cancer registration data and other linked datasets for England and Wales. It provides a central standardised system for combining regional data.\"},{\"question\":\"What checks should be done after loading the data?\",\"answer\":\"Verify that data has loaded correctly, especially comparing loaded data types against those defined in the provided schema. Adjust schema and table names and modify SQL functions if your dialect differs from Oracle 11g.\"},{\"question\":\"How do you write a basic SQL query in CAS?\",\"answer\":\"Use the SELECT statement to choose fields, the FROM clause to specify the table, and optionally a WHERE clause to filter results. End each query with a semi-colon (;) and run it in your database environment to view the Query Result window.\"}]","Cancer Analysis System (CAS) Guidance - Getting started with SQL and extracting data | PDF",58,[146,150,154],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/64485be49f6357f4d8b0c4672d68e2be.webp",983,1390,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/088aabf973b80a99caec1b8e78379575.webp",982,1388,{"page_no":30,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/a03f54b1fc58a711c3baf1ec21d99e48.webp",981,1387,{"list":159,"token":11},[160,166,172,178,184,190,196,203,209,215],{"doc_id":161,"doc_title":162,"file_type":137,"home_preview_img_url":163,"slug":164,"view_count":110,"category_name":29,"create_tm":165},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=1796110679&Signature=38X2NBFEsINDbA6gsd8fYMJLAXE%3D","01-hoffmansql-introduction-to-structured-query-language-version-466",1792966698,{"doc_id":167,"doc_title":168,"file_type":137,"home_preview_img_url":169,"slug":170,"view_count":110,"category_name":29,"create_tm":171},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=1796110679&Signature=zRDBqvXZ%2FfrvjZk6fCqSpe%2BmT3c%3D","a-visual-introductionto-sql-by-j-harvey-trimble-jr-and-david-chappell",1792966697,{"doc_id":173,"doc_title":174,"file_type":137,"home_preview_img_url":175,"slug":176,"view_count":96,"category_name":29,"create_tm":177},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=1796110679&Signature=HepiYCUl12mHOhBdnaPzcZMrJ54%3D","learning-sql-second-edition-learn-sql",1794187815,{"doc_id":179,"doc_title":180,"file_type":137,"home_preview_img_url":181,"slug":182,"view_count":33,"category_name":29,"create_tm":183},689536,"NetSuite SuiteQL Guide - Custom Fields, Joins & Queries","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001713856/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110679&Signature=pkhVJnbptgOo2wBwIaIzxHN0ncc%3D","netsuite-suiteql-guide-custom-fields-joins-queries",1794113303,{"doc_id":185,"doc_title":186,"file_type":137,"home_preview_img_url":187,"slug":188,"view_count":26,"category_name":29,"create_tm":189},718154,"SQL INTERVIEW LAB - 42 Tested Query Challenges - Worked Answers & Real Practice Database","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230019199650/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110679&Signature=qUj%2B7dolda423Bcl3DztRL%2Fa74w%3D","sql-interview-lab-42-tested-query-challenges-worked-answers-real-practice-database",1794854359,{"doc_id":191,"doc_title":192,"file_type":137,"home_preview_img_url":193,"slug":194,"view_count":96,"category_name":29,"create_tm":195},701367,"DATABASE MANAGEMENT SYSTEMS - Syllabus","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012296305/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110679&Signature=C4dD1Dw7j69NYhPrb4MlKHUUl8k%3D","database-management-systems-syllabus",1794528023,{"doc_id":197,"doc_title":198,"file_type":137,"home_preview_img_url":199,"slug":200,"view_count":201,"category_name":29,"create_tm":202},656145,"Structured Query Language - Introduction to SQL - SQL Server and Core Syntax","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975301637/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110679&Signature=5NjLqJHqgSn5ucSJ5UL6IugoCvE%3D","structured-query-language-introduction-to-sql-sql-server-and-core-syntax",14,1792966705,{"doc_id":204,"doc_title":205,"file_type":137,"home_preview_img_url":206,"slug":207,"view_count":105,"category_name":29,"create_tm":208},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=1796110679&Signature=0y33UM3%2BOa8%2Fc0SVAFAgwSnQ6lE%3D","ems-sql-query-powerful-tool-for-advanced-sql-query-building",1792966480,{"doc_id":210,"doc_title":211,"file_type":137,"home_preview_img_url":212,"slug":213,"view_count":123,"category_name":29,"create_tm":214},656140,"Oracle SQL by Example - Table of Contents","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975301629/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110679&Signature=WJi11D4QzgzZzO6OwCK3zC63Buw%3D","oracle-sql-by-example-table-of-contents",1792966695,{"doc_id":216,"doc_title":217,"file_type":137,"home_preview_img_url":218,"slug":219,"view_count":105,"category_name":29,"create_tm":220},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=1796110679&Signature=MP2vLzTAmSEQrtWWoDT4nhjaRT0%3D","sql-third-edition",1793647479]