Practical Questions - Google Docs (1), Any Language

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Question 1:

Find the unique and repeat number from the below array
Input : - [1, 2, 3, 2, 4, 10, 5, 3, 7, 1, 6, 7, 8, 9, 10]
Output :-
- Unique Numbers : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
- Repeat Numbers : [1, 2, 3, 7, 10]

Question 2:
Create script for city wise total sales in below table
Order Table :-
ID City Amount

1 1 200

2 2 300

3 3 400

4 1 300

5 3 200

6 2 400

7 1 200

8 2 300

9 3 250

10 1 120

City Table :-
ID Name

1 Ahmedabad

2 Bhavnagar

3 Surat
Question 3:
ABC company wants an order processing system for their order and inventory management.
According to product inventory display the order no. that cannot be processed further. Also,
Update the status of order completed if stock is available, otherwise set cancel.

Order Table :-
ID Order No. Product Code Qty Status

1 ORD001 P001 5 Pending

2 ORD002 P002 10 Pending

3 ORD003 P003 5 Pending

4 ORD004 P001 13 Pending

5 ORD005 P004 1 Pending

6 ORD006 P003 3 Pending

7 ORD007 P001 10 Pending

8 ORD008 P002 5 Pending

9 ORD009 P003 4 Pending

10 ORD010 P001 3 Pending

11 ORD011 P002 2 Pending

12 ORD012 P003 5 Pending

13 ORD013 P002 3 Pending

14 ORD014 P004 6 Pending

15 ORD015 P002 2 Pending

Product Table :-
ID Code Stock

1 P001 20

2 P002 30

3 P003 15

4 P004 35
Question 4:
Display the order details of the below product code.
Product Codes = P001, P005, P003, P006

Order Table :-
ID Order No. Product Code Status

1 ORD001 P001, P004 Shipped

2 ORD002 P002, P003, P005 Pending

3 ORD003 P003, P006 Completed

4 ORD004 P001, P002 Pending

5 ORD005 P004 Pending

6 ORD006 P003, P006 Canceled

7 ORD007 P001 Canceled

8 ORD008 P002, P008, P004 Pending

9 ORD009 P003, P002 Pending

10 ORD010 P008 Completed

11 ORD011 P002, P003 Pending

12 ORD012 P003, P001, P006 Shipped

13 ORD013 P002, P008 Shipped

14 ORD014 P004, P009 Pending

15 ORD015 P002, P003 Completed

You might also like