Here are the SQL commands for each specified query:
(i) To display the ClientName and City of all Mumbai- and Delhi-based clients in the Client table:
SELECT ClientName, City FROM Client WHERE City IN ('Mumbai', 'Delhi');
This query selects the ClientName and City fields from the Client table, filtering to show only those records where the City is either 'Mumbai' or 'Delhi'.
(ii) Increase the price of all the products in the Product table by 10%:
UPDATE Product SET Price = Price * 1.10;
This SQL command updates the Price of each product in the Product table by multiplying the current Price by 1.10, which effectively increases the price by 10%.
(iii) To display the ProductName, Manufacturer, and ExpiryDate of all the products that expired on or before ‘2010-12-31’:
SELECT ProductName, Manufacturer, ExpiryDate FROM Product WHERE ExpiryDate <= '2010-12-31';
This query retrieves the ProductName, Manufacturer, and ExpiryDate from the Product table for products whose ExpiryDate is on or before December 31, 2010.
(iv) To display C_ID, ClientName, and City of all the clients (including the ones that have not purchased a product) and their corresponding ProductName sold:
SELECT Client.C_ID, Client.ClientName, Client.City, Product.ProductName FROM Client LEFT JOIN Product ON Client.P_ID = Product.P_ID;
This query uses a LEFT JOIN to include all clients from the Client table and associates their corresponding ProductName from the Product table, including those entries where no matching product exists (indicated by NULL).
(v) To display ProductName, Manufacturer, and ClientName of clients from Mumbai:
SELECT Product.ProductName, Product.Manufacturer, Client.ClientName FROM Client JOIN Product ON Client.P_ID = Product.P_ID WHERE Client.City = 'Mumbai';
This query joins the Client and Product tables to fetch the ProductName, Manufacturer, and ClientName for all clients located in 'Mumbai'.
These SQL commands are crafted to extract specific information from the provided Product and Client tables in a relational database.