• Skip to primary navigation
  • Skip to content
  • Skip to footer
Thomas Ngo Thomas Ngo Crafting Elegant Solutions Through Code
  • Home
  • Journal
  • Tags
  • About

    Thomas Ngo

    Software Engineer

    • Stanton, California
    • Email
    • GitHub
    • Resume

    SQL problem - Number of Unique Subjects Taught by Each Teacher

    February 17, 2024 less than 1 minute read

    Page Navigation

    • Problem
    • Query
    1 min read 40 words

    Problem

    problem-2356

    Query

    SELECT
        teacher_id,
        COUNT(DISTINCT subject_id) as cnt
    FROM
        Teacher
    GROUP BY
        teacher_id
    

    Tags: SQL

    Updated: February 17, 2024

    Share on

    X Facebook LinkedIn Bluesky
    Previous Next

    Leave a comment

    You may also enjoy

    Using pyodbc to Insert Data from Excel or CSV to SQL Server

    July 17, 2026 5 minute read

    In many data engineering tasks, you often need to move data from local files like Excel or CSV into a centralized database like SQL Server. Python provides e...

    Robust Automation: Downloading and Extracting NPI Files from CMS with Python

    July 17, 2026 6 minute read

    In the healthcare data world, the National Provider Identifier (NPI) dataset from CMS is essential. However, the files are massive, and the manual process of...

    Understanding SelectList in ASP.NET Core MVC .NET 10

    2 minute read

    Dropdown lists are a staple of web forms. Learn how to effectively use SelectList and MultiSelectList in ASP.NET Core MVC to create dynamic, data-driven sele...

    Using JavaScript in ASP.NET Core MVC .NET 10: A Complete Guide

    2 minute read

    Master the art of integrating JavaScript into your ASP.NET Core MVC projects. From script placement to AJAX calls with Antiforgery tokens, learn everything y...

    • Follow:
    • GitHub
    • LinkedIn
    © 2026 Thomas Ngo.