• 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 - List the Products Ordered in a Period

    March 3, 2024 less than 1 minute read

    Page Navigation

    • Problem
    • Query
    1 min read 100 words

    Problem

    problem-1327

    Query

    SELECT
        p.product_name,
        SUM(o.unit) as unit
    FROM
        Products p,
        Orders o
    WHERE
        p.product_id = o.product_id
        AND YEAR(o.order_date) = 2020
        AND MONTH(o.order_date) = 2
    GROUP BY
        product_name
    HAVING
        SUM(o.unit) >= 100
    

    Tags: SQL

    Updated: March 3, 2024

    Share on

    X Facebook LinkedIn Bluesky
    Previous Next

    Leave a comment

    You may also enjoy

    Remove N-th Node From End of List in C#

    2 minute read

    Learn how to remove the n-th node from the end of a singly-linked list using the two-pointer approach in C#.

    Mastering Kusto Query Language (KQL) in Azure Application Insights

    2 minute read

    A professional guide to using Kusto Query Language (KQL) to explore, analyze, and visualize your Application Insights data.

    LeetCode: Reorder List in C#

    4 minute read

    Learn how to reorder a singly-linked list in-place using the slow/fast pointer technique, list reversal, and alternate merging in C#.

    Median of Two Sorted Arrays in C#

    5 minute read

    Learn how to find the median of two sorted arrays using both an intuitive merging approach and the optimal O(log(N+M)) binary search approach in C#.

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