Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

QUIRES:-

1. Get all users:

SELECT * FROM user;

2. Get user with a specific id:

SELECT * FROM user WHERE user_id = 1;

3. Get all banks:

SELECT * FROM bank;

4. Get bank with a specific account number:

SELECT * FROM bank WHERE account_no = '1234567890';

5. Get all companies:

SELECT * FROM companies;

6. Get company with a specific ISIN code:

SELECT * FROM companies WHERE ISIN_code = 'US0378331005';

7. Get all prices:

SELECT * FROM price;

8. Get price at a specific time:

SELECT * FROM price WHERE time = '2024-03-28 09:56:16';


9. Get all investments:

SELECT * FROM investments;

10. Get investment with a specific symbol:

SELECT * FROM investments WHERE symbol = 'AAPL';

11. Get all profits:

SELECT * FROM profits;

12. Get profit with a specific bought price:

SELECT * FROM profits WHERE price_bought = 100;

13. Get all bills:

SELECT * FROM bill;

14. Get bill with a specific id:

SELECT * FROM bill WHERE bill_id = 1;

15. Get all transactions:

SELECT * FROM transaction;

16. Get transaction with a specific type:

SELECT * FROM transaction WHERE transaction_type = 'buy';


17. Get the total money in a specific bank:

SELECT SUM(money) FROM bank WHERE bank_name = 'Bank Name';

18. Get the total volume of a specific investment:

SELECT SUM(volume) FROM investments WHERE symbol = 'AAPL';

19. Get the total volume of a specific profit:

SELECT SUM(volume) FROM profits WHERE price_bought = 100;

20. Get the total price of a specific transaction:

SELECT SUM(transaction_price) FROM transaction WHERE transaction_type =


'buy';

You might also like