EASYVerified Real Interview• Data Analyst / BIE

Duplicate ASIN Product Listings

Amazon Marketplace needs to detect seller listings where the same product ASIN has been posted more than once by different merchants.

Write a SQL query to return the asin and the total number of distinct seller_id accounts listing that ASIN, for all products listed by 2 or more sellers. Sort the output by the listing count descending, then by asin ascending.

Tables:

  • product_listings (listing_id INT, asin VARCHAR, seller_id INT, price DECIMAL)

Execution Sandbox:

Your query executes inside an isolated in-memory PostgreSQL engine (PGlite WebAssembly). You have full access to standard PostgreSQL aggregations, window functions, and CTEs.

Standard SQL (ANSI)|Ln 1, Col 1
⌘↵ Run Query
Ready to execute. Press Run (⌘+Enter)
Write your query and click “Run” or press ⌘+Enter to inspect output.