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
- BNBS 6114: Communication and Counselling Essay, LUC, Malaysia Communication is vital in improving health outcomes. Due to the new challenges posed by the COVID-19 pandemic
- F79MA: Statistical Model Assignment, HWU, Malaysia Suppose that you are a trainee actuary working in the mathematical modeling team for a non-governmental organization that is rolling out a micro-credit scheme to support rural communities in developing countries
- You are expected to conduct a presentation of the feasibility of the project based on the location: Project Management Assignment, TU, Malaysia
- Guidance For Children Assignment, UPM, Malaysia Learning by discovery is a technique for helping learners create and organize knowledge. Involving mindful participation
- BBPW3203: Choose any TWO companies listed in the consumer products and services sector of the Main Market: Financial Management II Assignment, OUM, Malaysia
- Analytics/justifications/pros and cons – for the improvement of human life?: Data Assignment, HWU, Malaysia
- BPMG3033: Urban and rural transport management Case Study, UUM, Malaysia What type of transportation mode should be used by ORKID to manage the distribution of their products to the customers
- BBUN2103: BUSINESS LAW Assignment, OUM, Malaysia Evaluate the circumstances that occur prior to the formation of a contract that may impair the validity of the contract.
- Essentials of Fintech Assignment, APU, Malaysia The Securities Commission Malaysia (SC) is keen to work with intermediaries and financial technology (fintech) providers
- C19BU: Strategic Management Case Study, HWU, Malaysia: Discuss how you would address any lack of alignment or a mismatch between Blue Sky’s historic activities and its new low-cost or economic strategy