{"id":109880,"date":"2025-07-10T15:48:22","date_gmt":"2025-07-10T10:18:22","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/?page_id=109880"},"modified":"2025-07-10T14:38:56","modified_gmt":"2025-07-10T09:08:56","slug":"sql-quiz","status":"publish","type":"page","link":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/","title":{"rendered":"SQL Quiz"},"content":{"rendered":"\n<div id=\"sql-quiz-app-wrapper\">\n    <style>\n        \/* --- General Reset & Variables --- *\/\n        html { scroll-behavior: smooth; }\n        #sql-quiz-app-wrapper {\n            --primary-blue: #1A73E8; --hover-blue: #1865c9; --background-grey: #F8F9FA; --border-grey: #DADCE0; --text-primary: #202124; --text-secondary: #5F6368; --option-bg: #FFFFFF; --option-hover-bg: #F1F3F4; --color-success: #1E8E3E; --correct-bg: #E6F4EA; --correct-text: #117233; --color-danger: #D93025; --incorrect-bg: #FCE8E6; --incorrect-text: #A50E0E; --color-warning: #f59e0b; --whatsapp-green: #25D366; --twitter-blue: #1DA1F2; --linkedin-blue: #0A66C2; --telegram-blue: #24A1DE; --shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15); --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1); font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif; color: var(--text-primary); box-sizing: border-box;\n        }\n        #sql-quiz-app-wrapper *, #sql-quiz-app-wrapper *::before, #sql-quiz-app-wrapper *::after { box-sizing: inherit; }\n        #quiz-app-container { width: 1200px; max-width: 100%; border-radius: 8px; overflow: hidden; margin: 50px auto auto auto; }\n        #sql-quiz-app-wrapper .quiz-screen { display: none; }\n        #sql-quiz-app-wrapper .quiz-screen.active { display: block; animation: fadeIn 0.5s ease-out; }\n        @keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }\n        \n        \/* --- Screen Padding & Header --- *\/\n        #main-menu-view, #user-details-view, #analysis-view { padding: 2rem 3rem; }\n        #sql-quiz-app-wrapper .quiz-header { text-align: center; margin-bottom: 2.5rem; }\n        #sql-quiz-app-wrapper .quiz-header h1 { font-size: 2.5rem; margin: 0 0 0.5rem 0; }\n        #sql-quiz-app-wrapper .quiz-header p { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }\n        \n        \/* --- Main Menu --- *\/\n        #sql-quiz-app-wrapper .difficulty-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }\n        #sql-quiz-app-wrapper .difficulty-card { border: 1px solid var(--border-grey); background-color: #fff; border-radius: 8px; text-align: center; padding: 1.5rem; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; }\n        #sql-quiz-app-wrapper .difficulty-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }\n        #sql-quiz-app-wrapper .difficulty-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }\n        #sql-quiz-app-wrapper .difficulty-card h2 { font-size: 1.5rem; margin: 0 0 0.5rem 0; }\n        #sql-quiz-app-wrapper .difficulty-card p { font-size: 0.9rem; color: var(--text-secondary); margin: 0 0 1.5rem 0; }\n        #sql-quiz-app-wrapper .difficulty-card .features { font-size: 0.875rem; color: var(--text-secondary); text-align: left; margin-bottom: 1.5rem; flex-grow: 1; }\n        #sql-quiz-app-wrapper .difficulty-card .features p { margin: 0.5rem 0; }\n        #sql-quiz-app-wrapper .start-btn { width: 100%; }\n        #sql-quiz-app-wrapper .difficulty-card.beginner h2 { color: var(--color-success); }\n        #sql-quiz-app-wrapper .difficulty-card.intermediate h2 { color: var(--color-warning); }\n        #sql-quiz-app-wrapper .difficulty-card.advanced h2 { color: var(--color-danger); }\n        #sql-quiz-app-wrapper .quiz-features-section { text-align: center; background-color: #fff; padding: 2rem; border-radius: 8px; border: 1px solid var(--border-grey); }\n        #sql-quiz-app-wrapper .quiz-features-section h2 { font-size: 1.5rem; margin: 0 0 1.5rem 0; }\n        #sql-quiz-app-wrapper .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }\n        #sql-quiz-app-wrapper .feature-item { display: flex; flex-direction: column; align-items: center; }\n        #sql-quiz-app-wrapper .feature-item .icon { font-size: 2rem; margin-bottom: 0.5rem; }\n        \n        \/* --- Buttons --- *\/\n        #sql-quiz-app-wrapper .quiz-btn { font-size: 0.875rem; font-weight: 500; padding: 0.6rem 1.5rem; border-radius: 4px; border: 1px solid var(--border-grey); cursor: pointer; transition: background-color 0.2s ease; margin-top: 20px;}\n        #sql-quiz-app-wrapper .quiz-btn.primary { background-color: var(--primary-blue); color: white; border-color: var(--primary-blue); }\n        #sql-quiz-app-wrapper .quiz-btn.primary:hover { background-color: var(--hover-blue); }\n        #sql-quiz-app-wrapper .quiz-btn:disabled { opacity: 0.5; cursor: not-allowed; }\n        \n        \/* --- Quiz Header & Progress --- *\/\n        #quiz-view { background-color: #fff; }\n        #quiz-header, #results-header, #analysis-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-grey); }\n        #quiz-header h1, #results-header h1, #analysis-header h1 { font-size: 1.25rem; margin: 0; }\n        #sql-quiz-app-wrapper .header-actions { display: flex; align-items: center; gap: 1rem; }\n        #progress-stepper { display: flex; gap: 0.5rem; flex-grow: 1; margin: 0 2rem; }\n        #sql-quiz-app-wrapper .step { height: 4px; flex-grow: 1; background-color: #E0E0E0; border-radius: 2px; transition: background-color 0.3s ease; }\n        #sql-quiz-app-wrapper .step.active { background-color: var(--primary-blue); }\n        #sql-quiz-app-wrapper .step.correct { background-color: var(--color-success); }\n        #sql-quiz-app-wrapper .step.incorrect { background-color: var(--color-danger); }\n        #question-count, #timer { font-size: 0.875rem; color: var(--text-secondary); font-weight: 500; }\n        #timer { min-width: 50px; text-align: right; }\n        \n        \/* --- Quiz Body & Options --- *\/\n        #quiz-body, #analysis-body { padding: 2rem 3rem; }\n        .sql-quiz-question-text { font-size: 1.25rem; margin: 0 0 2rem 0; line-height: 1.5; }\n        #options-container { display: flex; flex-direction: column; gap: 1rem; }\n        #sql-quiz-app-wrapper .option { border: 1px solid var(--border-grey); border-radius: 8px; cursor: pointer; transition: all 0.2s ease-in-out; }\n        #sql-quiz-app-wrapper .option:not(.disabled):hover { border-color: var(--primary-blue); box-shadow: 0 0 0 1px var(--primary-blue); }\n        #sql-quiz-app-wrapper .option-label { display: block; padding: 1rem; cursor: pointer; }\n        #sql-quiz-app-wrapper .option-letter { font-weight: 500; margin-right: 1rem; color: var(--primary-blue); }\n        #sql-quiz-app-wrapper .option.disabled { cursor: not-allowed; }\n        #sql-quiz-app-wrapper .option.correct { border-color: var(--color-success); background-color: var(--correct-bg); }\n        #sql-quiz-app-wrapper .option.incorrect { border-color: var(--color-danger); background-color: var(--incorrect-bg); }\n        \n        \/* --- Feedback & Hint --- *\/\n        #sql-quiz-app-wrapper .feedback { padding: 0 1rem 1rem 1rem; font-size: 0.9rem; line-height: 1.5; }\n        #sql-quiz-app-wrapper .feedback-title { font-weight: bold; }\n        #sql-quiz-app-wrapper .feedback-title.correct { color: var(--correct-text); }\n        #sql-quiz-app-wrapper .feedback-title.incorrect { color: var(--incorrect-text); }\n        #sql-quiz-app-wrapper .feedback-text { color: var(--text-secondary); margin-top: 0.25rem; }\n        #hint-container { margin-top: 2rem; }\n        #hint-toggle { color: var(--primary-blue); background: none; border: none; padding: 0; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; }\n        #hint-toggle svg { width: 20px; height: 20px; transition: transform 0.2s; }\n        #hint-toggle.open svg { transform: rotate(180deg); }\n        #hint-text { margin-top: 0.5rem; color: var(--text-secondary); padding: 1rem; background-color: var(--option-hover-bg); border-radius: 8px; font-size: 0.9rem; }\n        \n        \/* --- Quiz Footer --- *\/\n        #quiz-footer, #analysis-footer { display: flex; justify-content: space-between; padding: 1.5rem 3rem; gap: 1rem; border-top: 1px solid var(--border-grey); }\n        #analysis-footer { justify-content: flex-end; }\n        \n        \/* --- User Details & Analysis --- *\/\n        #user-details-form-container { max-width: 500px; margin: 2rem auto; }\n        #user-details-form .form-group { margin-bottom: 1rem; }\n        #user-details-form label { display: block; font-weight: 500; margin-bottom: 0.5rem; text-align: left;}\n        #user-details-form input { width: 100%; padding: 0.75rem; border: 1px solid var(--border-grey); border-radius: 4px; font-size: 1rem; }\n        #user-details-form input:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2); }\n        #user-details-form small { display: block; margin-top: 0.5rem; color: var(--text-secondary); font-size: 0.8rem; text-align: left;}\n        #sql-quiz-app-wrapper .form-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }\n        #sql-quiz-app-wrapper .form-actions .quiz-btn { flex: 1; }\n        #sql-quiz-app-wrapper .category-analysis { margin-bottom: 2rem; }\n        #sql-quiz-app-wrapper .category-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }\n        #sql-quiz-app-wrapper .category-header h3 { margin: 0; font-size: 1rem; }\n        #sql-quiz-app-wrapper .category-score { font-weight: 500; }\n        #sql-quiz-app-wrapper .progress-bar-bg { width: 100%; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }\n        #sql-quiz-app-wrapper .progress-bar-fg { height: 100%; background: var(--primary-blue); border-radius: 4px; transition: width 0.5s ease-out; }\n        #sql-quiz-app-wrapper .question-breakdown { font-size: 0.875rem; margin-top: 1rem; text-align: left; }\n        #sql-quiz-app-wrapper .question-breakdown strong { color: var(--correct-text); }\n        #sql-quiz-app-wrapper .question-breakdown span { color: var(--incorrect-text); }\n        #sql-quiz-app-wrapper .hidden { display: none; }\n\n        \/* --- START: New Results View Styles --- *\/\n        #results-view .container { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; color: #1A202C;}\n        #results-view .page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; flex-wrap: wrap; }\n        #results-view .header-title h1 { font-size: 2rem; font-weight: 700; margin: 0; }\n        #results-view .header-title p { color: #4A5568; margin-top: 0.25rem; }\n        #results-view .restart-quiz-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.2rem; background-color: #4353FF; border: 1px solid #E2E8F0; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; color: white; cursor: pointer; transition: background-color 0.2s; margin-top: 1rem; }\n        #results-view .restart-quiz-btn:hover { background-color: #4353FF; }\n        #results-view .main-content { display: grid; grid-template-columns: 1fr; gap: 2rem; }\n        #results-view .card { background-color: #ffffff; padding: 1.5rem; }\n        #results-view .score-card { text-align: center; color:gray;}\n        #results-view .score-card h2 { font-size: 1.125rem; font-weight: 600; margin-top: 0; margin-bottom: 1rem; }\n        #results-view .score-visual { position: relative; width: 10rem; height: 10rem; margin: 0 auto; }\n        #results-view .score-visual svg { width: 100%; height: 100%; }\n        #results-view .progress-ring-circle { transition: stroke-dashoffset 0.8s ease-out; transform: rotate(-90deg); transform-origin: 50% 50%; }\n        #results-view .score-text { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; }\n        #results-view .score-text .score-value { font-size: 2.25rem; font-weight: 700; }\n        #results-view .score-text .score-value span { font-size: 1.5rem; color: #4A5568; }\n        #results-view .score-text .score-label { font-size: 0.875rem; color: #4A5568; margin-top: 0.25rem; }\n        #results-view .score-breakdown { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }\n        #results-view .score-breakdown div span { font-weight: 700; font-size: 1.125rem; }\n        #results-view .score-breakdown div p { font-size: 0.75rem; color: #4A5568; margin: 0; }\n        #results-view .text-correct { color: #22c55e; }\n        #results-view .text-incorrect { color: #ef4444; }\n        #results-view .text-skipped { color: #6b7280; }\n        #results-view .analysis-card { display: flex; align-items: flex-start; gap: 1rem; justify-content: center; color:gray; }\n        #results-view .analysis-icon { flex-shrink: 0; width: 2.5rem; height: 2.5rem; background-color: #F0F1FF; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; }\n        #results-view .analysis-content h3 { font-weight: 600; margin: 0; font-size: 1.2rem; }\n        #results-view .analysis-content p { font-size: 0.875rem; color: #4A5568; margin: 0.25rem 0 1rem 0; }\n        #results-view .primary-button { width: 100%; padding: 0.6rem 1.2rem; background-color: #4353FF; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; color: #ffffff; border: none; cursor: pointer; transition: background-color 0.2s; }\n        #results-view .primary-button:hover { background-color: #2539cc; }\n        #results-view .learning-journey-card h2 { font-size: 1.5rem; font-weight: 700; margin-top: 0; }\n        #results-view .learning-journey-card > p { color: #4A5568; margin: 0.25rem 0 2rem 0; }\n        #results-view .course-list { display: flex; flex-direction: column; gap: 1rem; }\n        #results-view .course-card { padding: 1.25rem; border: 1px solid #E2E8F0; border-radius: 0.75rem; transition: box-shadow 0.2s, border-color 0.2s; }\n        #results-view .course-card:hover { border-color: #4353FF; box-shadow: 0 4px 6px -1px rgb(0 0 0 \/ 0.1), 0 2px 4px -2px rgb(0 0 0 \/ 0.1); }\n        #results-view .course-card-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 3px; }\n        #results-view .course-details h3 { font-weight: 700; margin: 0; font-size: 1rem; }\n        #results-view .course-details p { font-size: 0.875rem; color: #4A5568; margin-top: 0.25rem; max-width: 36rem; }\n        #results-view .course-button { margin-top: 1rem; flex-shrink: 0; padding: 0.3rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; cursor: pointer; border: 1px solid #4353FF; transition: background-color 0.2s; text-decoration: none; display: inline-block; }\n        #results-view .btn-primary { background-color: #4353FF; color: #ffffff; }\n        #results-view .btn-primary:hover { background-color: #2539cc; }\n        #results-view .page-footer { margin-top: 2rem; padding: 2rem; }\n        #results-view .footer-content { display: grid; grid-template-columns: 1fr; gap: 2rem; }\n        #results-view .footer-column h3 { font-size: 1.125rem; font-weight: 700; margin: 0; }\n        #results-view .footer-column p { font-size: 0.875rem; color: #4A5568; margin-top: 0.25rem; margin-bottom: 1rem; }\n        #results-view .resource-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }\n        #results-view .resource-link { padding: 0.5rem 1rem; background-color: #f3f4f6; color: #4A5568; font-size: 0.875rem; font-weight: 500; border-radius: 9999px; text-decoration: none; transition: background-color 0.2s, color 0.2s; }\n        #results-view .resource-link:hover { background-color: #F0F1FF; color: #4353FF; }\n        #results-view .share-icons { display: flex; align-items: center; gap: 0.75rem; }\n        #results-view .share-icon { width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; background-color: #f3f4f6; border-radius: 9999px; color: #4A5568; transition: background-color 0.2s; }\n        #results-view .share-icon:hover { background-color: #e5e7eb; }\n        #results-view .share-icon svg { width: 1.25rem; height: 1.25rem; }\n        \/* --- END: New Results View Styles --- *\/\n\n        \/* --- Media Queries (Responsiveness) --- *\/\n        @media (max-width: 768px) {\n            #main-menu-view, #quiz-body, #user-details-view, #analysis-view, #results-view .container { padding: 1.5rem; }\n            #sql-quiz-app-wrapper .quiz-header h1 { font-size: 2rem; }\n            #sql-quiz-app-wrapper .difficulty-grid { grid-template-columns: 1fr; }\n            #progress-stepper { display: none; }\n            #quiz-header h1 { font-size: 1rem; }\n            #quiz-footer { flex-direction: column-reverse; gap: 5rem; margin-bottom: -20px; }\n            #quiz-footer>div { display: flex; justify-content: flex-end; width: 100%; gap: 0.5rem; }\n        }\n        @media (min-width: 640px) {\n            #results-view .page-header { flex-wrap: nowrap; }\n            #results-view .restart-quiz-btn { margin-top: 0; }\n            #results-view .course-button { margin-top: 0; width: auto; }\n            #results-view .course-card-content { flex-wrap: nowrap; }\n        }\n        @media (min-width: 768px) {\n            #results-view .footer-content { grid-template-columns: 2fr 1fr; }\n        }\n        @media (min-width: 1024px) {\n            #results-view .main-content { grid-template-columns: 1fr 2fr; }\n        }\n    <\/style>\n    <div id=\"quiz-app-container\">\n        <div id=\"main-menu-view\" class=\"quiz-screen active\">\n            <div class=\"quiz-header\"><h1 id=\"sql-quiz-challenge\">SQL Quiz Challenge<\/h1><p>Test your database knowledge with our comprehensive SQL MCQs. Choose your difficulty and query your way to a high score!<\/p><\/div>\n            <div class=\"difficulty-grid\">\n                <div class=\"difficulty-card beginner\" onclick=\"showUserDetailsView('beginner')\">\n                    <div class=\"icon\">\u2b50<\/div><h2 id=\"beginner\">Beginner<\/h2><p>For those new to databases<\/p>\n                    <div class=\"features\"><p>\u2022 SELECT, WHERE clauses<\/p><p>\u2022 Sorting & Filtering<\/p><p>\u2022 Basic DML\/DDL<\/p><p>\u2022 10 Questions<\/p><\/div>\n                    <button class=\"quiz-btn primary start-btn\">Start Beginner Quiz<\/button>\n                <\/div>\n                <div class=\"difficulty-card intermediate\" onclick=\"showUserDetailsView('intermediate')\">\n                    <div class=\"icon\">\ud83c\udfc6<\/div><h2 id=\"intermediate\">Intermediate<\/h2><p>For those with some experience<\/p>\n                    <div class=\"features\"><p>\u2022 JOINs & Subqueries<\/p><p>\u2022 Aggregation & Grouping<\/p><p>\u2022 Data Integrity<\/p><p>\u2022 15 Questions<\/p><\/div>\n                    <button class=\"quiz-btn primary start-btn\">Start Intermediate Quiz<\/button>\n                <\/div>\n                <div class=\"difficulty-card advanced\" onclick=\"showUserDetailsView('advanced')\">\n                    <div class=\"icon\">\ud83e\udd47<\/div><h2 id=\"advanced\">Advanced<\/h2><p>A challenge for SQL experts<\/p>\n                    <div class=\"features\"><p>\u2022 Window Functions<\/p><p>\u2022 Common Table Expressions<\/p><p>\u2022 Transactions & Optimization<\/p><p>\u2022 15 Questions<\/p><\/div>\n                    <button class=\"quiz-btn primary start-btn\">Start Advanced Quiz<\/button>\n                <\/div>\n            <\/div>\n            <div class=\"quiz-features-section\">\n                <h2 id=\"quiz-features\">Quiz Features<\/h2>\n                <div class=\"features-grid\">\n                    <div class=\"feature-item\"><div class=\"icon\">\ud83e\udde0<\/div><p>Detailed Feedback<\/p><\/div>\n                    <div class=\"feature-item\"><div class=\"icon\">\ud83d\udcca<\/div><p>Performance Analysis<\/p><\/div>\n                    <div class=\"feature-item\"><div class=\"icon\">\ud83d\udca1<\/div><p>Helpful Hints<\/p><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div id=\"user-details-view\" class=\"quiz-screen\">\n            <div class=\"quiz-header\">\n                <h1 id=\"almost-there\">Almost There!<\/h1>\n                <p>Just a few details before you start the quiz.<\/p>\n            <\/div>\n            <div id=\"user-details-form-container\">\n               <form id=\"user-details-form\">\n                    <div class=\"form-group\"><label for=\"user-name\">Your Name<\/label><input type=\"text\" id=\"user-name\" name=\"user-name\" required><\/div>\n                    <div class=\"form-group\"><label for=\"user-email\">Your Email<\/label><input type=\"email\" id=\"user-email\" name=\"user-email\" required><\/div>\n                    <small>You will also get free access to exclusive content through email.<\/small>\n                    <div class=\"form-actions\">\n                        <button type=\"button\" id=\"back-to-menu-btn\" class=\"quiz-btn\">Back to Menu<\/button>\n                        <button type=\"submit\" class=\"quiz-btn primary\">Let's Go!<\/button>\n                    <\/div>\n                <\/form>\n            <\/div>\n        <\/div>\n        <div id=\"quiz-view\" class=\"quiz-screen\">\n            <header id=\"quiz-header\">\n                <h1 id=\"sql-quiz\">SQL Quiz<\/h1>\n                <div id=\"progress-stepper\"><\/div>\n                <div class=\"header-actions\"><div id=\"timer\">00:00<\/div><div id=\"question-count\">1\/10<\/div><\/div>\n            <\/header>\n            <main id=\"quiz-body\">\n                <h2 class=\"sql-quiz-question-text\" style=\"font-size: 22px;\" class=\"sql-quiz-question-text\" style=\"font-size: 22px;\" id=\"question-will-appear-here\">Question will appear here.<\/h2>\n                <div id=\"options-container\"><\/div>\n                <div id=\"hint-container\">\n                    <button id=\"hint-toggle\">Show hint <svg viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\"><\/path><\/svg><\/button>\n                    <div id=\"hint-text\" class=\"hidden\">Hint text goes here.<\/div>\n                <\/div>\n            <\/main>\n            <footer id=\"quiz-footer\">\n                <button class=\"quiz-btn\" onclick=\"showMainMenu(true)\">Back to Menu<\/button>\n                <div><button id=\"back-btn\" class=\"quiz-btn\">Back<\/button><button id=\"next-btn\" class=\"quiz-btn primary\">Next<\/button><\/div>\n            <\/footer>\n        <\/div>\n        \n        <div id=\"results-view\" class=\"quiz-screen\">\n            <div class=\"container\">\n                <header class=\"page-header\">\n                    <div class=\"header-title\">\n                        <h1 id=\"quiz-completed\">Quiz Completed!<\/h1>\n                        <p>Great effort! Here's a summary of your performance.<\/p>\n                    <\/div>\n                    <button class=\"restart-quiz-btn\" onclick=\"showMainMenu(false)\">\n                        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\"\/><path d=\"M3 3v5h5\"\/><\/svg>\n                        <span>Restart Quiz \/ Main Menu<\/span>\n                    <\/button>\n                <\/header>\n        \n                <main class=\"main-content\">\n                    <aside class=\"left-column\">\n                        <div class=\"card score-card\">\n                            <h2 id=\"your-score\">Your Score<\/h2>\n                            <div class=\"score-visual\">\n                                 <svg viewBox=\"0 0 100 100\">\n                                    <circle stroke=\"#e5e7eb\" stroke-width=\"10\" fill=\"transparent\" r=\"45\" cx=\"50\" cy=\"50\" \/>\n                                    <circle class=\"progress-ring-circle\" stroke=\"#4353FF\" stroke-width=\"10\" stroke-dasharray=\"282.6\" stroke-dashoffset=\"282.6\" stroke-linecap=\"round\" fill=\"transparent\" r=\"45\" cx=\"50\" cy=\"50\" id=\"score-circle\" \/>\n                                <\/svg>\n                                <div class=\"score-text\">\n                                    <span class=\"score-value\" id=\"new-score-value\">0<span>\/10<\/span><\/span>\n                                    <span class=\"score-label\" id=\"new-accuracy-label\">0% Accuracy<\/span>\n                                <\/div>\n                            <\/div>\n                            <div class=\"score-breakdown\">\n                                <div><span class=\"text-correct\" id=\"new-right-value\">0<\/span><p>Correct<\/p><\/div>\n                                <div><span class=\"text-incorrect\" id=\"new-wrong-value\">0<\/span><p>Incorrect<\/p><\/div>\n                                <div><span class=\"text-skipped\" id=\"new-skipped-value\">10<\/span><p>Skipped<\/p><\/div>\n                            <\/div>\n                        <\/div>\n        \n                        <div class=\"card analysis-card\" style=\"margin-top: 2rem;\">\n                            <div class=\"analysis-icon\">\n                               <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#4353FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"><\/path><\/svg>\n                            <\/div>\n                            <div class=\"analysis-content\">\n                                <h3 id=\"strengths-and-growth-areas\">Strengths and growth areas<\/h3>\n                                <p>Get a summary of your key strengths and discover areas where you can focus your studies.<\/p>\n                                <button class=\"primary-button\" id=\"analyse-btn\">Analyze my performance<\/button>\n                            <\/div>\n                        <\/div>\n                    <\/aside>\n        \n                    <section class=\"right-column\">\n                        <div class=\"card learning-journey-card\">\n                            <h2 id=\"continue-your-learning-journey\">Continue Your Learning Journey<\/h2>\n                            <p>Here are some courses that can help you level up your SQL skills.<\/p>\n                            <div class=\"course-list\">\n                                <div class=\"course-card\">\n                                    <div class=\"course-card-content\">\n                                        <div class=\"course-details\">\n                                            <h3 id=\"practical-sql-training\">Practical SQL Training<\/h3>\n                                            <p>Learn to manage databases and write SQL queries. Practice joins, subqueries, transactions, and DML\/DDL operations through real-world projects.<\/p>\n                                        <\/div>\n                                        <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/practical-sql-training?utm_source=blog\" target=\"_blank\" rel=\"noopener\" class=\"course-button btn-primary\">Enroll Now<\/a>\n                                    <\/div>\n                                <\/div>\n                                <div class=\"course-card\">\n                                    <div class=\"course-card-content\">\n                                        <div class=\"course-details\">\n                                            <h3 id=\"sql-data-analytics-course\">SQL Data Analytics Course<\/h3>\n                                            <p>Learn SQL for data analysis. Write advanced queries, solve real-world problems, and gain hands-on experience with datasets.<\/p>\n                                        <\/div>\n                                        <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/master-data-analytics-in-sql?utm_source=blog\" target=\"_blank\" rel=\"noopener\" class=\"course-button btn-primary\">Enroll Now<\/a>\n                                    <\/div>\n                                <\/div>\n                                 <div class=\"course-card\">\n                                    <div class=\"course-card-content\">\n                                        <div class=\"course-details\">\n                                            <h3 id=\"sql-for-data-science\">SQL for Data Science<\/h3>\n                                            <p>Learn SQL for data science with Python. Organize large datasets, perform analytics, and complete practical exercises.<\/p>\n                                        <\/div>\n                                        <a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/sql-for-data-science?utm_source=blog\" target=\"_blank\" rel=\"noopener\" class=\"course-button btn-primary\">Enroll for Free<\/a>\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                    <\/section>\n                <\/main>\n                \n                <footer class=\"card page-footer\">\n                    <div class=\"footer-content\">\n                        <div class=\"footer-column\">\n                            <h3 id=\"explore-more-resources\">Explore More Resources<\/h3>\n                            <p class=\"text-sm text-brand-text-secondary mt-1 mb-4\">Dive deeper into topics that interest you.<\/p>\n                            <div class=\"resource-links\">\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/quizzes\/\" class=\"resource-link\">Quizzes and MCQs<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/tools-and-compilers\/\" class=\"resource-link\">Online Compilers<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/exercises\/\" class=\"resource-link\">Coding Practice<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/interview-questions\/\" class=\"resource-link\">Interview Questions<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/careers-and-roadmap\/\" class=\"resource-link\">Careers and Roadmaps<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/project-ideas\/\" class=\"resource-link\">Project Ideas<\/a>\n                            <\/div>\n                        <\/div>\n        \n                        <div class=\"footer-column\">\n                             <h3 id=\"share-your-achievement\">Share Your Achievement<\/h3>\n                             <p>Let your network know about your progress.<\/p>\n                             <div class=\"share-icons\">\n                                 <a href=\"#\" id=\"new-share-whatsapp\" class=\"share-icon\" aria-label=\"WhatsApp\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" width=\"128\" height=\"128\" aria-labelledby=\"whTitle\" role=\"img\">\n                                    <title id=\"whTitle\">WhatsApp-style icon (custom color #4a5568)<\/title>\n                                    <defs>\n                                        <filter id=\"shadow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\"><feDropShadow dx=\"0\" dy=\"1.5\" stdDeviation=\"1.2\" flood-color=\"#000\" flood-opacity=\"0.18\"\/><\/filter>\n                                        <linearGradient id=\"baseGrad\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0%\" stop-color=\"#6b7280\"\/><stop offset=\"100%\" stop-color=\"#4a5568\"\/><\/linearGradient>\n                                    <\/defs>\n                                    <path d=\"M12 2C6.486 2 2 6.486 2 12c0 1.653.403 3.213 1.107 4.595L2 22l5.467-1.446A9.963 9.963 0 0 0 12 22c5.514 0 10-4.486 10-10S17.514 2 12 2z\" fill=\"#000\" opacity=\"0\" filter=\"url(#shadow)\"\/>\n                                    <path d=\"M12 2C6.486 2 2 6.486 2 12c0 1.653.403 3.213 1.107 4.595L2 22l5.467-1.446A9.963 9.963 0 0 0 12 22c5.514 0 10-4.486 10-10S17.514 2 12 2z\" fill=\"url(#baseGrad)\" stroke=\"#ffffff\" stroke-width=\"0.9\" stroke-linejoin=\"round\"\/>\n                                    <path d=\"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.472-.149-.672.15-.199.297-.768.967-.941 1.165-.173.199-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.884-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.52.151-.173.201-.298.301-.497.1-.199.05-.373-.025-.522-.075-.148-.672-1.612-.922-2.206-.242-.579-.487-.5-.672-.51l-.576-.01c-.199 0-.523.074-.798.373-.273.297-1.04 1.017-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.095 3.2 5.076 4.487 2.981 1.289 2.981.86 3.517.807.536-.05 1.758-.718 2.006-1.41.248-.692.248-1.285.173-1.41-.074-.124-.273-.198-.57-.347z\" fill=\"#ffffff\"\/>\n                                <\/svg><\/a>\n                                <a href=\"#\" id=\"new-share-linkedin\" class=\"share-icon\" aria-label=\"LinkedIn\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V5A2,2 0 0,1 5,3H19M18.5,18.5V13.2A3.26,3.26 0 0,0 15.24,9.94C14.39,9.94 13.4,10.43 12.92,11.24V10.13H10.13V18.5H12.92V13.57C12.92,12.8 13.54,12.17 14.31,12.17A1.4,1.4 0 0,1 15.71,13.57V18.5H18.5M6.88,8.56A1.68,1.68 0 0,0 8.56,6.88C8.56,6 7.81,5.25 6.88,5.25A1.69,1.69 0 0,0 5.2,6.88C5.2,7.81 5.95,8.56 6.88,8.56M8.27,18.5V10.13H5.5V18.5H8.27Z\" \/><\/svg><\/a>\n                                <a href=\"#\" id=\"new-share-telegram\" class=\"share-icon\" aria-label=\"Telegram\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M2.01 21L23 12L2.01 3L2 10L17 12L2 14L2.01 21Z\" \/><\/svg><\/a>\n                                <a href=\"#\" id=\"new-share-twitter\" class=\"share-icon\" aria-label=\"Twitter\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 2.9,4.79C2.53,5.42 2.33,6.15 2.33,6.94C2.33,8.43 3.11,9.75 4.19,10.55C3.47,10.53 2.8,10.33 2.2,10.03C2.2,10.05 2.2,10.07 2.2,10.08C2.2,12.24 3.73,14.04 5.7,14.44C5.31,14.55 4.91,14.61 4.5,14.61C4.22,14.61 3.95,14.58 3.69,14.53C4.24,16.33 5.95,17.55 7.95,17.59C6.46,18.8 4.57,19.56 2.5,19.56C2.17,19.56 1.85,19.54 1.53,19.5C3.55,20.84 5.9,21.6 8.41,21.6C16,21.6 20.34,15.22 20.34,9.73C20.34,9.56 20.33,9.4 20.32,9.23C21.16,8.63 21.88,7.87 22.46,7.01C21.74,7.33 20.97,7.55 20.18,7.65C20.99,7.16 21.64,6.38 21.96,5.43L22.46,6Z\" \/><\/svg><\/a>\n                             <\/div>\n                        <\/div>\n                    <\/div>\n                <\/footer>\n            <\/div>\n        <\/div>\n\n        <div id=\"analysis-view\" class=\"quiz-screen\">\n            <header id=\"analysis-header\"><h1 id=\"performance-analysis\">Performance Analysis<\/h1><\/header>\n            <main id=\"analysis-body\"><\/main>\n            <footer id=\"analysis-footer\">\n                <button id=\"back-to-results-btn\" class=\"quiz-btn primary\">Back to Results<\/button>\n            <\/footer>\n        <\/div>\n    <\/div>\n    <script>\n    document.addEventListener('DOMContentLoaded', function() {\n        \/\/ --- DATA ---\n        const quizData = {\n            beginner: [\n                { category: \"Fundamentals\", question: \"Which SQL clause is used to extract only the unique values from a column?\", options: { A: \"UNIQUE\", B: \"DISTINCT\", C: \"DIFFERENT\", D: \"SELECT UNIQUE\" }, answer: \"B\", hint: \"This keyword is placed directly after SELECT to eliminate duplicate rows from the result set.\", feedback: { B: \"Correct! The DISTINCT keyword is used with the SELECT statement to return only unique rows for the specified column(s).\" } },\n                { category: \"Filtering Data\", question: \"What is the correct way to filter for rows where the 'country' column is exactly 'Canada'?\", options: { A: \"WHERE country == 'Canada'\", B: \"WHERE country IS 'Canada'\", C: \"WHERE country = 'Canada'\", D: \"SET country = 'Canada'\" }, answer: \"C\", hint: \"In SQL, the single equals sign is used for comparison, not assignment or identity checking like in some other languages.\", feedback: { C: \"Correct! The WHERE clause uses the '=' operator for equality comparison with string or numeric values.\" } },\n                { category: \"Sorting Data\", question: \"How would you sort a result set by 'lastName' in descending (Z to A) order?\", options: { A: \"ORDER BY lastName DESC\", B: \"SORT BY lastName DESC\", C: \"ORDER BY lastName REVERSE\", D: \"SORT BY lastName DESCENDING\" }, answer: \"A\", hint: \"The keyword for sorting is ORDER BY, and it has a specific abbreviation for descending order.\", feedback: { A: \"Correct! ORDER BY is the clause for sorting, and the DESC keyword specifies a descending sort order. The default is ASC for ascending.\" } },\n                { category: \"Data Manipulation\", question: \"Which SQL statement is used to add new data into a database table?\", options: { A: \"ADD ROW\", B: \"CREATE RECORD\", C: \"INSERT INTO\", D: \"UPDATE TABLE\" }, answer: \"C\", hint: \"This two-part command specifies both the action and the target table for adding a new row.\", feedback: { C: \"Correct! The INSERT INTO statement is the standard DML (Data Manipulation Language) command for adding one or more new rows to a table.\" } },\n                { category: \"Filtering Data\", question: \"How do you select records where a column's value is unknown or empty?\", options: { A: \"WHERE column = NULL\", B: \"WHERE column IS NULL\", C: \"WHERE column = ''\", D: \"WHERE column IS EMPTY\" }, answer: \"B\", hint: \"NULL is a special state, not a value. You can't use standard comparison operators like '=' with it.\", feedback: { B: \"Correct! In SQL, NULL represents the absence of a value, so you must use the 'IS NULL' or 'IS NOT NULL' syntax to filter for it.\" } },\n                { category: \"Aggregation\", question: \"Which function is used to find the total number of rows in a result set?\", options: { A: \"SUM()\", B: \"TOTAL()\", C: \"COUNT(*)\", D: \"NUMBER()\" }, answer: \"C\", hint: \"This aggregate function uses a wildcard character to signify 'all rows'.\", feedback: { C: \"Correct! COUNT(*) is the standard aggregate function to count all rows in the specified table or group. COUNT(column_name) would count non-NULL values in that specific column.\" } },\n                { category: \"Primary Keys\", question: \"What is the primary purpose of a 'Primary Key' in a table?\", options: { A: \"To be the first column in the table\", B: \"To uniquely identify each record in a table\", C: \"To link the table to other tables\", D: \"To be the main column used for sorting\" }, answer: \"B\", hint: \"This constraint ensures that no two rows in a table have the same value in this column, and that the value cannot be NULL.\", feedback: { B: \"Correct! A Primary Key is a constraint that enforces entity integrity by uniquely identifying each row. It must contain unique values and cannot contain NULL values.\" } },\n                { category: \"Data Manipulation\", question: \"Which DML statement is used to modify existing records in a table?\", options: { A: \"MODIFY\", B: \"CHANGE\", C: \"INSERT\", D: \"UPDATE\" }, answer: \"D\", hint: \"This command is often paired with a SET clause to specify the new values and a WHERE clause to specify which rows to change.\", feedback: { D: \"Correct! The UPDATE statement is used to modify the existing rows in a table based on the condition specified in the WHERE clause.\" } },\n                { category: \"Filtering Data\", question: \"Which operator would you use in a WHERE clause to search for a specific pattern in a column?\", options: { A: \"MATCH\", B: \"LIKE\", C: \"SIMILAR\", D: \"SEARCH\" }, answer: \"B\", hint: \"This operator uses wildcard characters like '%' (for zero or more characters) and '_' (for a single character).\", feedback: { B: \"Correct! The LIKE operator is used in a WHERE clause to search for a specified pattern in a column, making it essential for string matching.\" } },\n                { category: \"Fundamentals\", question: \"What does DDL stand for in the context of SQL?\", options: { A: \"Data Definition Language\", B: \"Data Distribution Language\", C: \"Data Duplication Language\", D: \"Data Deletion Language\" }, answer: \"A\", hint: \"This subset of SQL commands deals with the structure (schema) of the database, using commands like CREATE, ALTER, and DROP.\", feedback: { A: \"Correct! DDL stands for Data Definition Language. It's the set of SQL commands used to create, modify, and delete database structures but not the data itself.\" } }\n            ],\n            intermediate: [\n                { category: \"Joins\", question: \"Which type of JOIN returns all records from the left table, and the matched records from the right table?\", options: { A: \"INNER JOIN\", B: \"FULL OUTER JOIN\", C: \"RIGHT JOIN\", D: \"LEFT JOIN\" }, answer: \"D\", hint: \"The name of this join indicates which table's records will all be preserved in the result set.\", feedback: { D: \"Correct! A LEFT JOIN (or LEFT OUTER JOIN) returns all rows from the left table and the matching rows from the right table. If there is no match, the columns from the right table will have NULL values.\" } },\n                { category: \"Aggregation\", question: \"What is the difference between the WHERE and HAVING clauses?\", options: { A: \"WHERE filters rows before aggregation, HAVING filters groups after aggregation\", B: \"HAVING filters rows before aggregation, WHERE filters groups after aggregation\", C: \"They are functionally identical\", D: \"WHERE is used for strings, HAVING is used for numbers\" }, answer: \"A\", hint: \"Think about the order of operations in a query: filtering individual rows happens before grouping them.\", feedback: { A: \"Correct! This is a critical concept. The WHERE clause filters individual rows from the source data. After these rows are grouped by the GROUP BY clause, the HAVING clause is used to filter the resulting groups based on an aggregate condition.\" } },\n                { category: \"Subqueries\", question: \"What is a subquery (or inner query)?\", options: { A: \"A query that is stored in the database for reuse\", B: \"A query that is nested inside another SQL query\", C: \"A query that only uses a subset of a table's columns\", D: \"A query that uses an index to run faster\" }, answer: \"B\", hint: \"It can be embedded within the WHERE, HAVING, or FROM clause of another query.\", feedback: { B: \"Correct! A subquery is a query embedded within the statement of another query. The result of the inner query is used by the outer query.\" } },\n                { category: \"Set Operators\", question: \"What is the primary difference between UNION and UNION ALL?\", options: { A: \"UNION ALL is faster because it does not remove duplicate rows\", B: \"UNION is faster because it does not remove duplicate rows\", C: \"UNION can combine tables with different numbers of columns\", D: \"UNION ALL can only be used on two tables\" }, answer: \"A\", hint: \"One of these operators performs an extra step to ensure the final result set is unique.\", feedback: { A: \"Correct! Both operators combine the result sets of two or more SELECT statements. However, UNION performs a 'DISTINCT' operation to remove duplicate rows, while UNION ALL includes all rows, including duplicates. This makes UNION ALL significantly faster.\" } },\n                { category: \"Conditional Logic\", question: \"Which SQL statement provides if-then-else logic within a query?\", options: { A: \"IF...THEN...ELSE\", B: \"DECODE\", C: \"CASE\", D: \"IIF\" }, answer: \"C\", hint: \"This statement starts with its own name and ends with 'END'.\", feedback: { C: \"Correct! The CASE statement is the standard ANSI SQL way to implement conditional logic, allowing you to return different values based on specified conditions.\" } },\n                { category: \"Foreign Keys\", question: \"What is the main purpose of a 'Foreign Key'?\", options: { A: \"To uniquely identify a record in the current table\", B: \"To create a link between two tables and enforce referential integrity\", C: \"To create an index for faster lookups\", D: \"To store data from another country's database\" }, answer: \"B\", hint: \"This constraint in one table points to a Primary Key in another table, ensuring a valid relationship between the data.\", feedback: { B: \"Correct! A Foreign Key is a field (or collection of fields) in one table that uniquely identifies a row of another table. It's the cornerstone of relational database design, enforcing referential integrity.\" } },\n                { category: \"Schema Modification\", question: \"Which DDL command is used to add, delete, or modify columns in an existing table?\", options: { A: \"MODIFY TABLE\", B: \"UPDATE TABLE\", C: \"ALTER TABLE\", D: \"CHANGE TABLE\" }, answer: \"C\", hint: \"This command 'alters' the very structure of the table.\", feedback: { C: \"Correct! The ALTER TABLE statement is used to modify the definition (structure) of a table by adding, modifying, or dropping columns and constraints.\" } },\n                { category: \"Transactions\", question: \"In a transaction, what does the 'COMMIT' command do?\", options: { A: \"It undoes all the changes made in the transaction\", B: \"It saves all the changes made in the transaction permanently to the database\", C: \"It creates a temporary savepoint\", D: \"It starts a new transaction\" }, answer: \"B\", hint: \"Think of this as the final 'save' button for a series of operations.\", feedback: { B: \"Correct! A transaction is a sequence of operations performed as a single logical unit of work. The COMMIT command concludes the transaction and makes all changes made during the transaction permanent.\" } },\n                { category: \"Data Deletion\", question: \"What is the key difference between DELETE and TRUNCATE?\", options: { A: \"TRUNCATE is a DML command, while DELETE is DDL\", B: \"DELETE can be rolled back, while TRUNCATE is often a non-logged, faster operation that cannot be easily rolled back\", C: \"DELETE removes the table, TRUNCATE removes the data\", D: \"TRUNCATE allows a WHERE clause, DELETE does not\" }, answer: \"B\", hint: \"One command removes rows one by one and logs each deletion, while the other deallocates the data pages, which is much faster.\", feedback: { B: \"Correct! DELETE is a DML operation that removes rows and can be used with a WHERE clause. It's logged and can be rolled back. TRUNCATE is a DDL operation that removes all rows by deallocating pages, is much faster, uses fewer resources, and typically cannot be rolled back.\" } },\n                { category: \"Joins\", question: \"What result will an INNER JOIN of Table A and Table B produce?\", options: { A: \"All rows from Table A and matching rows from Table B\", B: \"All rows from both tables\", C: \"Only the rows that have matching values in both tables\", D: \"All rows from Table B and matching rows from Table A\" }, answer: \"C\", hint: \"This is the most common type of join, creating a result set of the intersection between two tables.\", feedback: { C: \"Correct! An INNER JOIN selects records that have matching values in both tables. It is the intersection of the two tables based on the join condition.\" } },\n                { category: \"Indexes\", question: \"What is the primary benefit of creating an index on a database column?\", options: { A: \"It enforces unique values in the column\", B: \"It reduces the storage space required for the table\", C: \"It speeds up the retrieval of rows (SELECT queries)\", D: \"It ensures the data in the column is always sorted\" }, answer: \"C\", hint: \"Think of an index in a book; it helps you find information much faster without scanning every page.\", feedback: { C: \"Correct! An index is a special lookup table that the database search engine can use to speed up data retrieval. While it consumes more storage, it dramatically improves query performance, especially on large tables.\" } },\n                { category: \"Aliases\", question: \"What is the purpose of the AS keyword in a SELECT statement?\", options: { A: \"To perform a type conversion\", B: \"To filter results based on a condition\", C: \"To create a temporary, alternative name for a column or table\", D: \"To insert data into a table\" }, answer: \"C\", hint: \"It's used to make column names in the result set more readable or to simplify query syntax with long table names.\", feedback: { C: \"Correct! The AS keyword is used to create an alias, which is a temporary name given to a table or a column in a query for the purpose of making the query easier to read and write.\" } },\n                { category: \"Filtering Data\", question: \"Which operator is a shorthand for specifying multiple OR conditions?\", options: { A: \"BETWEEN\", B: \"ANY\", C: \"ALL\", D: \"IN\" }, answer: \"D\", hint: \"This operator allows you to specify a list of values in parentheses.\", feedback: { D: \"Correct! The IN operator allows you to specify a list of values in a WHERE clause. It's a concise way of writing multiple OR conditions (e.g., WHERE Country IN ('USA', 'Canada') is the same as WHERE Country = 'USA' OR Country = 'Canada').\" } },\n                { category: \"Transactions\", question: \"What is the function of the ROLLBACK command?\", options: { A: \"To permanently save all changes\", B: \"To undo all the uncommitted changes made during the current transaction\", C: \"To re-run the last executed command\", D: \"To revert the database to a previous day's backup\" }, answer: \"B\", hint: \"This is the 'undo' command for a series of operations that have not yet been permanently saved.\", feedback: { B: \"Correct! The ROLLBACK command is used to undo transactions that have not already been saved to the database with a COMMIT command. It reverts the data to the state it was in at the beginning of the transaction.\" } },\n                { category: \"Joins\", question: \"Which type of JOIN can result in a Cartesian product if no join condition is provided?\", options: { A: \"INNER JOIN\", B: \"LEFT JOIN\", C: \"CROSS JOIN\", D: \"SELF JOIN\" }, answer: \"C\", hint: \"This join type is specifically designed to match every row from the first table with every row from the second table.\", feedback: { C: \"Correct! A CROSS JOIN produces a result set which is the number of rows in the first table multiplied by the number of rows in the second table. This is known as a Cartesian product. An INNER JOIN without a condition will also produce this result, but CROSS JOIN is the explicit syntax for it.\" } }\n            ],\n            advanced: [\n                { category: \"Window Functions\", question: \"Which window function assigns a unique, sequential integer to each row within a partition?\", options: { A: \"RANK()\", B: \"DENSE_RANK()\", C: \"ROW_NUMBER()\", D: \"NTILE(n)\" }, answer: \"C\", hint: \"Unlike RANK() and DENSE_RANK(), this function will never produce the same number for two different rows in the same partition.\", feedback: { C: \"Correct! ROW_NUMBER() assigns a unique integer to each row. If two rows have the same value in the ORDER BY clause, their row numbers will still be sequential. RANK() and DENSE_RANK() would assign them the same rank.\" } },\n                { category: \"CTEs\", question: \"What is a major advantage of using a Common Table Expression (CTE) over a subquery?\", options: { A: \"CTEs are always faster than subqueries\", B: \"CTEs improve readability and can be referenced multiple times within the same query\", C: \"CTEs can be used in a WHERE clause, but subqueries cannot\", D: \"CTEs are the only way to join a table to itself\" }, answer: \"B\", hint: \"CTEs are defined using a WITH clause at the beginning of a query, which helps break down complex logic into named, logical steps.\", feedback: { B: \"Correct! A CTE, defined with the WITH keyword, creates a temporary named result set. This greatly improves the readability of complex queries and allows the result set to be referenced multiple times, which is necessary for tasks like recursive queries.\" } },\n                { category: \"Subqueries\", question: \"What is a 'correlated subquery'?\", options: { A: \"A subquery that can be run independently of the outer query\", B: \"A subquery that depends on the outer query for its values and is evaluated once for each row processed by the outer query\", C: \"A subquery that returns multiple columns\", D: \"A subquery that is used inside a HAVING clause\" }, answer: \"B\", hint: \"This type of subquery can be inefficient because it has to re-run for every single row of the outer query.\", feedback: { B: \"Correct! A correlated subquery is an inner query that is dependent on the outer query. It cannot be executed on its own and relies on data from the current row being processed by the outer query. This row-by-row execution can lead to performance issues.\" } },\n                { category: \"Query Optimization\", question: \"In the context of query optimization, what is a 'table scan'?\", options: { A: \"A fast and efficient way to retrieve data using an index\", B: \"The process of the database engine reading every single row in a table to find the requested data\", C: \"A security procedure to check for malicious code in a table\", D: \"A DDL command to copy the structure of a table\" }, answer: \"B\", hint: \"This is often the least efficient data retrieval method, especially on large tables, and is something you try to avoid by using indexes.\", feedback: { B: \"Correct! A table scan (or full table scan) occurs when the SQL engine has to iterate through every row of a table because it cannot use an index to locate the required rows. It is generally very inefficient for large tables.\" } },\n                { category: \"Window Functions\", question: \"What is the difference between RANK() and DENSE_RANK()?\", options: { A: \"RANK() skips numbers after a tie, while DENSE_RANK() does not\", B: \"DENSE_RANK() skips numbers after a tie, while RANK() does not\", C: \"RANK() is for numbers, DENSE_RANK() is for strings\", D: \"They are functionally identical\" }, answer: \"A\", hint: \"If two rows are tied for 2nd place, one function will assign the next rank as 3, while the other will assign it as 4.\", feedback: { A: \"Correct! If two rows tie for rank 2, RANK() will assign them both rank 2 and the next row rank 4 (skipping 3). DENSE_RANK() will assign them both rank 2 and the next row rank 3 (no gap).\" } },\n                { category: \"Joins\", question: \"When would you use a SELF JOIN?\", options: { A: \"When you want to join a table to itself to compare rows within the same table\", B: \"When you want to join two different tables that have the same name\", C: \"It is not a real type of join in SQL\", D: \"When you want to get the Cartesian product of a table\" }, answer: \"A\", hint: \"A classic example is querying an 'employees' table to find each employee's manager, where the manager is also an employee in the same table.\", feedback: { A: \"Correct! A SELF JOIN is a regular join, but the table is joined with itself. It's useful for querying hierarchical data or comparing rows within the same table, such as finding employees who have the same salary or report to the same manager.\" } },\n                { category: \"Transactions\", question: \"What is the purpose of setting a 'Transaction Isolation Level'?\", options: { A: \"To control the visibility and locking behavior of one transaction with respect to other concurrent transactions\", B: \"To determine which users are isolated from running transactions\", C: \"To set the maximum number of statements allowed in a transaction\", D: \"To encrypt the data being modified in a transaction\" }, answer: \"A\", hint: \"This setting helps manage concurrency issues like dirty reads, non-repeatable reads, and phantom reads.\", feedback: { A: \"Correct! Isolation levels are a crucial part of concurrency control. They define the degree to which one transaction must be isolated from the data modifications made by any other transaction, balancing data consistency against performance.\" } },\n                { category: \"CTEs\", question: \"What is a 'Recursive CTE' used for?\", options: { A: \"To repeatedly reference a standard CTE multiple times\", B: \"To query hierarchical data, such as an organizational chart or bill of materials\", C: \"To create a CTE that calls itself infinitely\", D: \"To improve the performance of a simple join\" }, answer: \"B\", hint: \"It consists of an anchor member and a recursive member that calls the CTE itself, allowing it to traverse tree-like data structures.\", feedback: { B: \"Correct! A recursive CTE is one that references itself. It is extremely powerful for working with hierarchical or graph-like data structures, allowing you to traverse relationships level by level.\" } },\n                { category: \"Window Functions\", question: \"Which window function allows you to access data from a subsequent row in the same result set without a self-join?\", options: { A: \"LAG()\", B: \"LEAD()\", C: \"LAST_VALUE()\", D: \"NEXT_VALUE()\" }, answer: \"B\", hint: \"This function 'leads' the current row, looking ahead in the partition.\", feedback: { B: \"Correct! The LEAD() function provides access to a row at a given physical offset that follows the current row. Its counterpart, LAG(), accesses data from a previous row.\" } },\n                { category: \"Data Structures\", question: \"What is the key difference between a VIEW and a MATERIALIZED VIEW?\", options: { A: \"A VIEW is a stored query, while a MATERIALIZED VIEW is a stored query that also physically stores the result set\", B: \"A VIEW can be indexed, but a MATERIALIZED VIEW cannot\", C: \"MATERIALIZED VIEWS are always updated in real-time\", D: \"There is no functional difference; the name is database-specific\" }, answer: \"A\", hint: \"One is just a virtual table representing a query's logic, while the other is a physical table containing pre-computed data.\", feedback: { A: \"Correct! A standard VIEW is a stored SELECT statement; the query is run every time you access the view. A MATERIALIZED VIEW physically stores the query result as a table. This provides much faster access but requires the data to be periodically refreshed.\" } },\n                { category: \"Operators\", question: \"How does the EXISTS operator differ from the IN operator when used with a subquery?\", options: { A: \"EXISTS is a 'true\/false' check for row existence, while IN compares all values from the subquery's result set\", B: \"IN is more efficient for large subquery result sets\", C: \"EXISTS can only be used in a SELECT clause\", D: \"They are completely interchangeable with no performance difference\" }, answer: \"A\", hint: \"EXISTS stops processing as soon as it finds its first match, which can make it more efficient than IN, which may need to process the entire subquery result.\", feedback: { A: \"Correct! The EXISTS operator checks if the subquery returns any rows and evaluates to true or false. It does not care what the values are. The IN operator takes the result set of the subquery and compares it against a value. Generally, EXISTS is more efficient because it can stop as soon as a condition is met.\" } },\n                { category: \"Grouping\", question: \"What is the purpose of the GROUP BY clause extensions like ROLLUP or CUBE?\", options: { A: \"To generate subtotals and grand totals within a single query\", B: \"To sort the grouped data in a specific three-dimensional way\", C: \"To create a pivot table directly in the result set\", D: \"To improve the performance of a standard GROUP BY\" }, answer: \"A\", hint: \"These advanced features let you get multiple levels of aggregation without having to use complex UNION ALL statements.\", feedback: { A: \"Correct! ROLLUP and CUBE are extensions of the GROUP BY clause. ROLLUP generates subtotals for a hierarchy of columns (e.g., Year, then Year+Quarter, then Year+Quarter+Month), plus a grand total. CUBE generates subtotals for all possible combinations of the columns.\" } },\n                { category: \"Conditional Logic\", question: \"What does the COALESCE function do?\", options: { A: \"It concatenates multiple strings together\", B: \"It returns the first non-NULL value in a list of expressions\", C: \"It converts a value from one data type to another\", D: \"It calculates the average of a set of numbers\" }, answer: \"B\", hint: \"It's a very useful function for substituting a default value when a column might be NULL.\", feedback: { B: \"Correct! COALESCE(val1, val2, val3, ...) evaluates the arguments in order and returns the current value of the first expression that initially does not evaluate to NULL. It's a standard ANSI SQL function for handling NULLs.\" } },\n                { category: \"Triggers\", question: \"What is a database 'Trigger'?\", options: { A: \"A scheduled job that runs a query at a specific time\", B: \"A special type of stored procedure that automatically runs when a specific event (e.g., INSERT, UPDATE) occurs on a table\", C: \"A user-defined function that can be called from a SELECT statement\", D: \"A security mechanism to start an alarm on unauthorized access\" }, answer: \"B\", hint: \"This database object is 'triggered' by a DML event, allowing you to enforce complex business rules or auditing automatically.\", feedback: { B: \"Correct! A trigger is a set of SQL statements that are automatically executed, or fired, in response to certain events on a particular table or view. These events are typically INSERT, UPDATE, or DELETE operations.\" } },\n                { category: \"Pivoting Data\", question: \"What is the general purpose of a PIVOT operation?\", options: { A: \"To turn columns into rows\", B: \"To rotate a table 90 degrees\", C: \"To turn unique values from one column into multiple new columns\", D: \"To calculate a running total across columns\" }, answer: \"C\", hint: \"This operation transforms data from a 'tall' format to a 'wide' format, often used in reporting.\", feedback: { C: \"Correct! PIVOT rotates a table-valued expression by turning the unique values from one column in the expression into multiple columns in the output, and performs aggregations where required on any remaining column values.\" } }\n            ]\n        };\n        \/\/ --- STATE ---\n        let quizState = {\n            difficulty: null,\n            questions: [],\n            currentIndex: 0,\n            userAnswers: [],\n            timerInterval: null,\n            totalSeconds: 0,\n        };\n        let selectedDifficulty = null;\n        \/\/ --- CORE FUNCTIONS ---\n        function showScreen(screenId) {\n            document.querySelectorAll('#sql-quiz-app-wrapper .quiz-screen').forEach(screen => {\n                screen.classList.remove('active');\n            });\n            const targetScreen = document.getElementById(screenId);\n            if (targetScreen) {\n                targetScreen.classList.add('active');\n            }\n        }\n        function startTimer() {\n            if (quizState.timerInterval) clearInterval(quizState.timerInterval);\n            quizState.timerInterval = setInterval(() => {\n                quizState.totalSeconds++;\n                const mins = Math.floor(quizState.totalSeconds \/ 60).toString().padStart(2, '0');\n                const secs = (quizState.totalSeconds % 60).toString().padStart(2, '0');\n                const timerEl = document.querySelector('#quiz-view #timer');\n                if(timerEl) timerEl.textContent = `${mins}:${secs}`;\n            }, 1000);\n        }\n        function stopTimer() {\n            clearInterval(quizState.timerInterval);\n        }\n        function resetQuizState() {\n            stopTimer();\n            quizState = {\n                difficulty: null, questions: [], currentIndex: 0, userAnswers: [], timerInterval: null, totalSeconds: 0,\n            };\n        }\n        window.showMainMenu = function(confirmFirst = false) {\n            if (confirmFirst) {\n                if (confirm('Are you sure you want to exit? Your progress will be lost.')) {\n                    resetQuizState();\n                    sessionStorage.removeItem('sqlQuizResultState'); \/\/ Clear saved state\n                    showScreen('main-menu-view');\n                }\n            } else {\n                resetQuizState();\n                sessionStorage.removeItem('sqlQuizResultState'); \/\/ Clear saved state\n                showScreen('main-menu-view');\n            }\n        }\n        window.showUserDetailsView = function(difficulty) {\n            const userInfoJSON = localStorage.getItem('quizUserInfo');\n            if (userInfoJSON) {\n                try {\n                    const userInfo = JSON.parse(userInfoJSON);\n                    if (new Date().getTime() < userInfo.expires) {\n                        startQuiz(difficulty);\n                        return;\n                    }\n                } catch(e) { \/* Invalid JSON *\/ }\n            }\n            selectedDifficulty = difficulty;\n            showScreen('user-details-view');\n            document.getElementById('user-name').focus();\n        }\n        function startQuiz(difficulty) {\n            quizState = {\n                difficulty,\n                questions: quizData[difficulty] || [],\n                currentIndex: 0,\n                userAnswers: new Array((quizData[difficulty] || []).length).fill(null),\n                timerInterval: null,\n                totalSeconds: 0,\n            };\n            showScreen('quiz-view');\n            setupQuizUI();\n            loadQuestion();\n            startTimer();\n        }\n        function setupQuizUI() {\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            const quizTitle = quizScreenEl.querySelector('#quiz-title');\n            const questionCount = quizScreenEl.querySelector('#question-count');\n            const stepper = quizScreenEl.querySelector('#progress-stepper');\n            const timer = quizScreenEl.querySelector('#timer');\n            if (quizTitle) quizTitle.textContent = `${quizState.difficulty.charAt(0).toUpperCase() + quizState.difficulty.slice(1)} SQL Quiz`;\n            if (questionCount) questionCount.textContent = `${quizState.currentIndex + 1}\/${quizState.questions.length}`;\n            if (timer) timer.textContent = '00:00';\n            if (stepper) stepper.innerHTML = quizState.questions.map(() => `<div class=\"step\"><\/div>`).join('');\n        }\n        function loadQuestion() {\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            const question = quizState.questions[quizState.currentIndex];\n            if (!question) return;\n            const questionText = quizScreenEl.querySelector('.sql-quiz-question-text');\n            const optionsContainer = quizScreenEl.querySelector('#options-container');\n            const hintText = quizScreenEl.querySelector('#hint-text');\n            const hintToggle = quizScreenEl.querySelector('#hint-toggle');\n            const questionCountEl = quizScreenEl.querySelector('#question-count');\n            if (questionCountEl) questionCountEl.textContent = `${quizState.currentIndex + 1}\/${quizState.questions.length}`;\n            if (questionText) questionText.innerHTML = `${quizState.currentIndex + 1}. ${question.question}`;\n            if (optionsContainer) {\n                optionsContainer.innerHTML = '';\n                Object.entries(question.options).forEach(([key, value]) => {\n                    const optionDiv = document.createElement('div');\n                    optionDiv.className = 'option';\n                    optionDiv.dataset.key = key;\n                    optionDiv.innerHTML = `<label class=\"option-label\"><span class=\"option-letter\">${key}.<\/span> ${value}<\/label>`;\n                    optionDiv.addEventListener('click', () => handleOptionClick(key));\n                    optionsContainer.appendChild(optionDiv);\n                });\n            }\n            if (hintText) {\n                hintText.textContent = question.hint;\n                hintText.classList.add('hidden');\n            }\n            if (hintToggle) {\n                hintToggle.classList.remove('open');\n                hintToggle.disabled = false;\n            }\n            updateProgress();\n            restoreAnswerState();\n        }\n        function handleOptionClick(selectedKey) {\n            if (quizState.userAnswers[quizState.currentIndex] !== null) return;\n            const question = quizState.questions[quizState.currentIndex];\n            const isCorrect = selectedKey === question.answer;\n            quizState.userAnswers[quizState.currentIndex] = { selected: selectedKey, isCorrect };\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            quizScreenEl.querySelectorAll('.option').forEach(opt => {\n                opt.classList.add('disabled');\n                if (opt.dataset.key === question.answer) {\n                    opt.classList.add('correct');\n                    addFeedback(opt, true);\n                } else if (opt.dataset.key === selectedKey) {\n                    opt.classList.add('incorrect');\n                    addFeedback(opt, false);\n                }\n            });\n            const hintToggle = quizScreenEl.querySelector('#hint-toggle');\n            if (hintToggle) hintToggle.disabled = true;\n            updateProgress();\n        }\n        function addFeedback(optionDiv, isCorrect) {\n            const question = quizState.questions[quizState.currentIndex];\n            const selectedKey = optionDiv.dataset.key;\n            const feedbackText = question.feedback[selectedKey] || (isCorrect ? question.feedback[question.answer] : \"That's not the correct choice.\");\n            if (!optionDiv.querySelector('.feedback')) {\n                optionDiv.querySelector('.option-label').insertAdjacentHTML('afterend', `\n                <div class=\"feedback\">\n                    <div class=\"feedback-title ${isCorrect ? 'correct' : 'incorrect'}\">${isCorrect ? '\u2713 Correct' : '\u2717 Incorrect'}<\/div>\n                    <div class=\"feedback-text\">${feedbackText}<\/div>\n                <\/div>`);\n            }\n        }\n        function restoreAnswerState() {\n            const answer = quizState.userAnswers[quizState.currentIndex];\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            if (answer) {\n                quizScreenEl.querySelectorAll('.option').forEach(opt => {\n                    opt.classList.add('disabled');\n                    if (opt.dataset.key === quizState.questions[quizState.currentIndex].answer) {\n                        opt.classList.add('correct');\n                        if (opt.dataset.key === answer.selected) addFeedback(opt, true);\n                    } else if (opt.dataset.key === answer.selected) {\n                        opt.classList.add('incorrect');\n                        addFeedback(opt, false);\n                    }\n                });\n            }\n        }\n        function updateProgress() {\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            const backBtn = quizScreenEl.querySelector('#back-btn');\n            const nextBtn = quizScreenEl.querySelector('#next-btn');\n            const stepper = quizScreenEl.querySelector('#progress-stepper');\n            if (backBtn) backBtn.disabled = quizState.currentIndex === 0;\n            if (nextBtn) nextBtn.textContent = (quizState.currentIndex === quizState.questions.length - 1) ? 'Finish' : 'Next';\n            if(stepper) {\n                [...stepper.children].forEach((step, i) => {\n                    step.className = 'step';\n                    if (i === quizState.currentIndex) step.classList.add('active');\n                    const answer = quizState.userAnswers[i];\n                    if (answer) step.classList.add(answer.isCorrect ? 'correct' : 'incorrect');\n                });\n            }\n        }\n        function showResults() {\n            stopTimer();\n            const correctCount = quizState.userAnswers.filter(a => a?.isCorrect).length;\n            const totalQuestions = quizState.questions.length;\n            const answeredCount = quizState.userAnswers.filter(a => a !== null).length;\n            const wrongCount = answeredCount - correctCount;\n            const skippedCount = totalQuestions - answeredCount;\n            const accuracy = answeredCount > 0 ? Math.round((correctCount \/ answeredCount) * 100) : 0;\n            const scorePercentage = totalQuestions > 0 ? Math.round((correctCount \/ totalQuestions) * 100) : 0;\n            \n            \/\/ Save quiz state to sessionStorage to persist results\n            sessionStorage.setItem('sqlQuizResultState', JSON.stringify(quizState));\n\n            \/\/ Populate new results view elements\n            document.querySelector('#new-score-value').innerHTML = `${correctCount}<span>\/${totalQuestions}<\/span>`;\n            document.querySelector('#new-accuracy-label').textContent = `${accuracy}% Accuracy`;\n            document.querySelector('#new-right-value').textContent = correctCount;\n            document.querySelector('#new-wrong-value').textContent = wrongCount;\n            document.querySelector('#new-skipped-value').textContent = skippedCount;\n            \n            \/\/ Animate progress circle\n            const circle = document.getElementById('score-circle');\n            const radius = circle.r.baseVal.value;\n            const circumference = radius * 2 * Math.PI;\n            circle.style.strokeDasharray = `${circumference} ${circumference}`;\n            setTimeout(() => {\n                const offset = circumference - scorePercentage \/ 100 * circumference;\n                circle.style.strokeDashoffset = offset;\n            }, 100);\n            \n            setupShareLinks(correctCount, accuracy);\n            showScreen('results-view');\n        }\n        function setupShareLinks(score, accuracy) {\n            const url = window.location.href;\n            const text = `I scored ${score}\/${quizState.questions.length} on the ${quizState.difficulty} SQL Quiz! Can you beat my score?`;\n            const title = 'SQL Quiz Challenge';\n            \n            \/\/ Update to new share link IDs\n            document.getElementById('new-share-whatsapp').onclick = (e) => { e.preventDefault(); window.open(`https:\/\/api.whatsapp.com\/send?text=${encodeURIComponent(text + '\\n\\n' + url)}`, '_blank'); };\n            document.getElementById('new-share-twitter').onclick = (e) => { e.preventDefault(); window.open(`https:\/\/twitter.com\/intent\/tweet?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`, '_blank'); };\n            document.getElementById('new-share-linkedin').onclick = (e) => { e.preventDefault(); window.open(`https:\/\/www.linkedin.com\/shareArticle?mini=true&url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}&summary=${encodeURIComponent(text)}`, '_blank'); };\n            document.getElementById('new-share-telegram').onclick = (e) => { e.preventDefault(); window.open(`https:\/\/t.me\/share\/url?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`, '_blank'); };\n        }\n        function handleUserDetailsSubmit(event) {\n            event.preventDefault();\n            const form = document.getElementById('user-details-form');\n            const name = form.querySelector('#user-name').value.trim();\n            const email = form.querySelector('#user-email').value.trim();\n            if (!name || !email) { alert('Please fill in both your name and email.'); return; }\n            const expirationTime = new Date().getTime() + (60 * 24 * 60 * 60 * 1000); \/\/ 60 days\n            localStorage.setItem('quizUserInfo', JSON.stringify({ expires: expirationTime }));\n            \n            \/\/ Submit to Google Form\n            const formURL = \"https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLScAVF17oENbZXTwsTuQ7VzwLPeT6IG5iilch2LoEoYsbzik5A\/formResponse\";\n            const formData = new FormData();\n            formData.append(\"entry.1956958717\", name); \/\/ Name field\n            formData.append(\"entry.1149718564\", email); \/\/ Email field\nformData.append(\"entry.1658362758\", window.location.href);\n            fetch(formURL, { method: \"POST\", body: formData, mode: \"no-cors\" }).catch(console.error);\n            form.reset();\n            startQuiz(selectedDifficulty);\n        }\n        \/\/ --- EVENT LISTENERS ---\n        document.getElementById('user-details-form').addEventListener('submit', handleUserDetailsSubmit);\n        document.getElementById('back-to-menu-btn').addEventListener('click', () => showMainMenu(false));\n        document.getElementById('back-to-results-btn').addEventListener('click', () => showScreen('results-view'));\n        document.getElementById('next-btn').addEventListener('click', () => {\n             if (quizState.currentIndex < quizState.questions.length - 1) {\n                 quizState.currentIndex++;\n                 loadQuestion();\n             } else {\n                 showResults();\n             }\n         });\n        document.getElementById('back-btn').addEventListener('click', () => {\n             if (quizState.currentIndex > 0) {\n                 quizState.currentIndex--;\n                 loadQuestion();\n             }\n         });\n        document.getElementById('hint-toggle').addEventListener('click', () => {\n             document.getElementById('hint-text').classList.toggle('hidden');\n             document.getElementById('hint-toggle').classList.toggle('open');\n         });\n        document.getElementById('analyse-btn').addEventListener('click', () => {\n            const analysisByCat = quizState.questions.reduce((acc, { category }, i) => {\n                if (!acc[category]) acc[category] = { total: 0, correct: 0, correctQs: [], incorrectQs: [] };\n                acc[category].total++;\n                const answer = quizState.userAnswers[i];\n                if (answer?.isCorrect) {\n                    acc[category].correct++;\n                    acc[category].correctQs.push(i + 1);\n                } else if (answer) {\n                    acc[category].incorrectQs.push(i + 1);\n                }\n                return acc;\n            }, {});\n            const analysisModalBody = document.getElementById('analysis-body');\n            analysisModalBody.innerHTML = Object.entries(analysisByCat).map(([category, data]) => {\n                const percentage = data.total > 0 ? Math.round((data.correct \/ data.total) * 100) : 0;\n                return `<div class=\"category-analysis\"><div class=\"category-header\"><h3 id=\"category\">${category}<\/h3><div class=\"category-score\">${percentage}% Correct<\/div><\/div><div class=\"progress-bar-bg\"><div class=\"progress-bar-fg\" style=\"width: ${percentage}%;\"><\/div><\/div><div class=\"question-breakdown\">${data.correctQs.length > 0 ? `<p><strong>Correct:<\/strong> Q${data.correctQs.join(', Q')}<\/p>` : ''}${data.incorrectQs.length > 0 ? `<span>Incorrect:<\/span> Q${data.incorrectQs.join(', Q')}` : ''}<\/div><\/div>`;\n            }).join('');\n            showScreen('analysis-view');\n        });\n\n        \/\/ --- INITIALIZATION ---\n        \/\/ Check for saved results on page load\n        const savedStateJSON = sessionStorage.getItem('sqlQuizResultState');\n        if (savedStateJSON) {\n            try {\n                quizState = JSON.parse(savedStateJSON);\n                \/\/ Stop any lingering timers if the user refreshed mid-quiz\n                if (quizState.timerInterval) clearInterval(quizState.timerInterval);\n                showResults();\n            } catch (e) {\n                console.error(\"Failed to parse saved quiz state.\", e);\n                sessionStorage.removeItem('sqlQuizResultState');\n                showScreen('main-menu-view');\n            }\n        } else {\n            showScreen('main-menu-view');\n        }\n    });\n    <\/script>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Also Check:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.mygreatlearning.com\/sql\/free-courses\">Free SQL Courses<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/sql-editor-tool\/\">Online SQL Compiler<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/sql-exercises\/\">SQL Exercise<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/what-does-an-sql-developer-do\/\">How to Become an SQL Developer<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/sql-interview-questions\/\">SQL Interview Questions and Answers<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/hands-on-sql-projects\/\">SQL Project Ideas for All Levels&nbsp;<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>SQL Quiz Challenge Test your database knowledge with our comprehensive SQL MCQs. Choose your difficulty and query your way to a high score! \u2b50 Beginner For those new to databases \u2022 SELECT, WHERE clauses \u2022 Sorting &#038; Filtering \u2022 Basic DML\/DDL \u2022 10 Questions Start Beginner Quiz \ud83c\udfc6 Intermediate For those with some experience \u2022 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":109886,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25860],"tags":[36800,36874,36844],"class_list":["post-109880","page","type-page","status-publish","has-post-thumbnail","hentry","category-software","tag-it-jobs","tag-quiz","tag-sql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Quiz and MCQs to Test Your Knowledge<\/title>\n<meta name=\"description\" content=\"Explore a wide range of SQL MCQs to test your knowledge and prepare for SQL interviews and exams.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Quiz\" \/>\n<meta property=\"og:description\" content=\"Explore a wide range of SQL MCQs to test your knowledge and prepare for SQL interviews and exams.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1408\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"SQL Quiz\",\"datePublished\":\"2025-07-10T10:18:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/\"},\"wordCount\":336,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/sql-quiz-image.webp\",\"keywords\":[\"IT Jobs\",\"quiz\",\"sql\"],\"articleSection\":[\"IT\\\/Software Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/\",\"name\":\"SQL Quiz and MCQs to Test Your Knowledge\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/sql-quiz-image.webp\",\"datePublished\":\"2025-07-10T10:18:22+00:00\",\"description\":\"Explore a wide range of SQL MCQs to test your knowledge and prepare for SQL interviews and exams.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/sql-quiz-image.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/sql-quiz-image.webp\",\"width\":1408,\"height\":768,\"caption\":\"SQL Quiz\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/sql-quiz\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Quiz\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Quiz and MCQs to Test Your Knowledge","description":"Explore a wide range of SQL MCQs to test your knowledge and prepare for SQL interviews and exams.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/","og_locale":"en_US","og_type":"article","og_title":"SQL Quiz","og_description":"Explore a wide range of SQL MCQs to test your knowledge and prepare for SQL interviews and exams.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","og_image":[{"width":1408,"height":768,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_site":"@Great_Learning","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"SQL Quiz","datePublished":"2025-07-10T10:18:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/"},"wordCount":336,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image.webp","keywords":["IT Jobs","quiz","sql"],"articleSection":["IT\/Software Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/","url":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/","name":"SQL Quiz and MCQs to Test Your Knowledge","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image.webp","datePublished":"2025-07-10T10:18:22+00:00","description":"Explore a wide range of SQL MCQs to test your knowledge and prepare for SQL interviews and exams.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image.webp","width":1408,"height":768,"caption":"SQL Quiz"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/sql-quiz\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Quiz"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image.webp",1408,768,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image-150x150.webp",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image-300x164.webp",300,164,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image-768x419.webp",768,419,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image-1024x559.webp",1024,559,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image.webp",1408,768,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image.webp",1408,768,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image-640x768.webp",640,768,true],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image-96x96.webp",96,96,true],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/07\/sql-quiz-image-150x82.webp",150,82,true]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"SQL Quiz Challenge Test your database knowledge with our comprehensive SQL MCQs. Choose your difficulty and query your way to a high score! \u2b50 Beginner For those new to databases \u2022 SELECT, WHERE clauses \u2022 Sorting & Filtering \u2022 Basic DML\/DDL \u2022 10 Questions Start Beginner Quiz \ud83c\udfc6 Intermediate For those with some experience \u2022&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages\/109880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=109880"}],"version-history":[{"count":8,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages\/109880\/revisions"}],"predecessor-version":[{"id":109883,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages\/109880\/revisions\/109883"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/109886"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=109880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=109880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=109880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}