EASYVerified Real Interview• Data Analyst / BIE
Duplicate ASIN Product Listings
Verified Source:Public Candidate Interview Report
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_idINT,asinVARCHAR,seller_idINT,priceDECIMAL)
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(7 lines, 111 chars)
Tab Indent⌘↵ Run Query
Ready to execute. Press Run (⌘+Enter)
Write your query and click “Run” or press ⌘+Enter to inspect output.