Post Views – 2

Post views are being analysed using post_views table. This table contains information of all views on each posts date wise.Task is to find all viewers (viewer_id) who viewed more than one post on same date. Sort the final output in ascending order.   Input Table: post_views post_id author_id viewer_id view_date 22 2 4 2017-01-10 44 … Read more

Product with sales increasing every year

A multinational Company is going through very bad timings and now want to focus on products which has shown increased sales and profit every year. They are looking for your help in identifying such products so that they can plan marketing campaign accordingly. Input Table – Product_sales sale_year product_id units_sold 2016 1 1000 2016 2 … Read more

Sales Analysis – 2

Tables – product and sales are provided. product table holds data of all products and sales table represent sale transaction that was completed. Write SQL query to identify buyer_id who bought S10 but not iPhone. Input Table: sales seller_id product_id buyer_id sale_date quantity price 11 10 71 2019-02-22 3 6000 11 20 72 2019-03-27 1 600 … Read more