Created
February 17, 2016 12:28
-
-
Save beck03076/2ed460e29b4ac5469c8c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use sellerdata; | |
1. select count(*) from sellers; | |
2. select count(*) from seller_histories where signed_in_at is not null; | |
3. select count(s.user_id) from treasureProduct.products p INNER JOIN seller_histories s ON s.user_id = p.user_id where s.signed_in_at is not null group by p.user_id having count(p.id) > 0; | |
4. select count(*) from sellers where app_installed = 1; | |
5. select sum(a) from (select count(s.user_id) as a from treasureProduct.products p INNER JOIN seller_histories s ON s.user_id = p.user_id where s.signed_in_at is not null group by p.user_id having count(p.id) > 0) as b; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment