Write SQL queries to answer the following questions. Use the information given in each table: Database Assignment, IIU, Malaysia
University | INTI International University (IIU) |
Subject | Database Assignment |
1. Write SQL queries to answer the following questions. Use the information given in each table.
a) List the customer details who has a balance of more than 300.
b) List the customer’s name, area code, and invoice number of all customers. Sort the answer in descending order by customer name.
C) List the male customer details whose name starts with the letter
d) Find the number of male customers and display the column name as ‘Total
e) Find the minimum, maximum, average, and number of customers for each area code.
f) Change the balance for Siti to 500.
g) Find the name of a customer who lives in the same area as Diana.
2. Consider the structure of the following PRODUCT table.
a) Write the SQL command to create a new table called PRODUCT based on the information given in Table 1 below.
b) Change the field length of the description to VARCHAR(30) in the PRODUCT table.
c) Add a price column in between description and code in the PRODUCT table. This column only allows floating number data to be entered with a maximum precision of 3 digits and a scale of 2 digits.
d) Rename column description to in the PRODUCT table. This column only
allows variable character data to be entered with a maximum of 30 characters.
Get Help By Expert
Need help with your Data Assignment in Malaysia? Look to our assignment helper Malaysia service, where Malaysian students can conveniently pay someone to do my assignment and receive personalized support. Our team of experts is adept at handling various data-related tasks, including analysis, modelling, and programming.
Recent Solved Questions
- Criminal Law Assignment, GIC, Malaysia Identify the case is heard in which court, the presiding judge, the prosecutor, and the defense counsel
- MHRD510: Global Human Resource Management Research Paper, HU, Malaysia Expatriates are employees who leave their country of origin in order to work and reside in another country
- ACC2200: Introduction to management accounting Assignment, MUM, Malaysia Assuming you are planning to set up a business selling goods to customers in Kuala Lumpur or the Selangor area
- Company Law Assignment, BAC, Malaysia CLOUD-ASSISTED cyber-physical systems have broad applications, ranging from healthcare to smart electricity grid
- Choose any three (3) accounting standards that you have learned in the class and discuss briefly: Finance Accounting And Management Assignment, UON, Malaysia
- Management & Innovation Report, HWU, Malaysia Prepare a detailed report in terms of identifying the current innovation challenges of the organization
- Risk and Hazard Management Assignment, SU, Malaysia Description of the industry or workplace. Evaluation of the possible hazards and risks covering factors such as human errors
- Business Law Assignment, TU, Malaysia AngTiong offered to sell his pharmacy to Zol for RM1 million via letter
- EPS0317- You are instructed to prepare a sale and purchase agreement for a terrace house in Cheras: Bar Council Malaysia Ethics and Professional Standards Course, Assignment, UKM, Malaysia
- TCP1201: Objected-Oriented Programming and Data Structures Assignment, MMU, Malaysia Your updated version of the COVID-19 vaccination system now consists of 4 separate JavaFX programs