• 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
    • LinkedIn
    • Resume

    SQL problem - Product Sales Analysis I

    February 5, 2024 less than 1 minute read

    Page Navigation

    • Problem
    • Query
    • Editorial Solution
    1 min read 101 words

    Problem

    problem

    Query

    SELECT 
        product_name,
        year,
        price
    FROM
        Sales AS s
    JOIN
        Product AS p
        ON s.product_id = p.product_id
    

    Editorial Solution

    SELECT 
        DISTINCT p.product_name, s.year, s.price
    FROM 
        Sales s
    JOIN 
        Product p
    ON
        s.product_id = p.product_id
    

    Tags: SQL

    Updated: February 5, 2024

    Share on

    X Facebook LinkedIn Bluesky
    Previous Next

    Leave a comment

    You may also enjoy

    AZ-900 Study Notes: IaaS vs. PaaS vs. SaaS, and When to Use Each

    October 28, 2026 8 minute read

    AZ-900 rarely asks “what does PaaS stand for?” It asks scenario questions: “A company wants to do X. Which service type should it use?” This post is about an...

    AZ-900 Study Notes: Cloud Service Types (IaaS, PaaS, SaaS)

    October 27, 2026 5 minute read

    Short, exam-focused notes on the three cloud service types: IaaS, PaaS, and SaaS. Read it once, then use the tables and the quiz at the end to review.

    AZ-900 Study Notes: Cloud Computing, Cloud Models, and Azure Stack

    October 26, 2026 20 minute read

    I’m preparing for AZ-900: Microsoft Azure Fundamentals, and these are my study notes for the first big topic on the exam: what cloud computing is, the differ...

    How Claude Code Runs Your Tasks: Where the Model Thinks and Where the Code Runs

    October 25, 2026 11 minute read

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