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
- BDPB2103: Introductory Human Resource Management Assignment, OUM, Malaysia The purpose of this assignment is to develop the learners’ ability to discuss performance appraisal methods and problems in an organization
- MPU3193: Philosophy and Current Issues Assignment, WOU, Malaysia After 64 years of being an independent country, do you think that Malaysia is free from the influence of Western colonization
- Finance Assignment, NUN, Malaysia It is 25 July 2022; you observe two treasury bills? What are the appropriate discount factors for 2 months and 8 months
- Malaysian Governance Essay, CU, Malaysia At the end of the twentieth century and the beginning of the twenty-first century, the concept of governance
- BBM207: HRM in the ‘New Millennium’, discuss on the changing roles of HR in accordance to that: Human Resource Management, Assignment, WOU, Malaysia
- Contract Law Course Work, IIUM, Malaysia Our law of contract is widely seen as deficient in the sense that it is perceived to be hampered by the presence of an unnecessary
- Given the following conditional value table, determine the appropriate decision under uncertainty using: Optimization Technique Assignment, UMP, Malaysia
- ITS63304: Object Oriented Programming Assignment, TU, Malaysia You need to provide the rationale and justification on how your application can support the specific target
- GSGM7223 Organisational Development and Change Management Assignment, Malaysia
- UCS422: Your organization is planning to adopt BYOD which allow the employee: Introduction To Cyber Security for Non- Computing Science Assignment, UiTM, Malaysia