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
- LGV7034: The risk manager has an important role to play in an organisation’s risk management: Risk Management Individual Assignment, VUC, Malaysia
- AFT1083: Microeconomics Case Study, UMK, Malaysia Refined sugar producer MSM Malaysia Holdings Bhd’s profitability may be affected if the new government lowers
- HRM581: Malaysian Employment Law Assignment, UiTM, Malaysia Mandy is a 20-year-old Malaysian employed as an Administrative Clerk at AMD Precision Sdn Bhd in Melaka
- EBE1083: Exploring Post-Pandemic Macroeconomics: Challenges and Opportunities: Principles of Macroeconomics, Assignment, UNIMAS, Malaysia
- Unit 1 Briefly introduce the organization you are working in or have previously worked in, by highlighting the different stakeholders: Strategic Management And Leadership, Assignment, Malaysia
- Biology Assignment, MMU, Malaysia Monkeypox virus is an enveloped, double-stranded, deoxyribonucleic acid zoonotic orthopoxvirus in the Poxviridae
- Supply Chain Management Assignment, APU, Malaysia Tesla Advances Its EVs by Rethinking Traditional Automotive Supply Chain Practices. Historically, the automobile industry
- CCS11303: OBJECT ORIENTED PROGRAMMING Assignment, SUT, Malaysia To provide an in-depth understanding of java programming and for students to demonstrate effective java skills
- Treasure Management Essay, TARC, Malaysia Due to the multiplicity and complexity of non-financial and financial risks, as well as uncertainties to a bank
- Company and Business Law Assignment, BAC, Malaysia Demonstrated ability to identify a legal issue arising from a set of facts. Demonstrated ability to apply a relevant