Create a report object to display all the clients

Assignment Help Database Management System
Reference no: EM132949763

COIT11237 Database Design & Implementation

Introduction
Students must complete all the following parts of this assessment task:
A. SQL Queries
B. Form
C. Report

ShareTrade database
CQShare Brokers Ltd (CQSB) maintains the trade data of their clients in ShareTrade database. For every trade, done by the clients, CQSB charges brokerage and GST (on brokerage only). The ShareTrade database contains the following tables:
• Client table that has the list of clients' details.
• Company table that has the list of listed companies whose shares are available for trade (buy or sell).
• Trade table that contains the details of trades performed by the clients.

Part A - SQL Queries
Using the downloaded database (ShareTrade), write SQL queries to answer all the questions in this part. Each of the following questions has an information request followed by the expected results for the given sample data.
Please adhere to the following guidelines in answering the questions:
• You must not use query design view. You are required to use SQL view to develop your queries.
• Where a column has been renamed in the expected result, you must reproduce that name in your results. For example, if ClientId appears as Client Number in the expected result, then you must make this column name appear as Client Number in your output.
• You must list the same columns as shown in the expected results.
• Simple queries are preferred. If your query is overly complex, you may not get full marks.
• You are not required to enforce row order on your queries unless specified.
• Unless otherwise specified, you need to remove duplicates in the output.
• Unless it is specified, you can use any type of constructs to solve the queries. E.g., You can use either implicit join or explicit join to solve the query.
• Your SQL must continue to produce the correct answer even if the data changes. E.g., If there is an update in the brokerage value, then the total brokerage amount should be updated accordingly.

Questions:
1. List the names of all clients and their respective total number of trades.
Hint: A trade can be a buy or a sale.

ClientName

NumTrades

ABC consultants

75

XYZ Ltd

6

CQU Super

3

2. Which company shares were bought but not sold by the client - CQU Super?

AsxCode

CompanyName

ClientName

TAB

Tabcorp

CQU Super

3. Which client has done maximum number of trades (both buy and sell together)? Display those client names and their respective number of trades.
Hint: A trade can be a buy or a sale.

ClientName

NumTrades

ABC consultants

75

Hint: You may try the following:
1) Write a query to display the name and number of trades done by each client (outer query).
2) Write another query to list only the number of trades done by each client (inner query).
3) Modify the outer query so that it can display its rows by using a count(*) >= ALL of the rows in the inner query.

4. For each type of trades, done by ABC consultants on Pie Lithium Ltd shares, display the ASX code, trade type and net trade value.
Hint:
You have to use union operator to answer this query.
Net Trade amount for buy is: Gross Trade amount + Charges
Net Trade amount for sale is: Gross Trade amount - Charges
Where Gross Trade amount is: Quantity * Price

ASXCode

TradeType

NetTradeValue

PLL

Buy

$193,536.24

PLL

Sell

$185,564.97

5. Which company shares have been traded more than five times?
Hint: A trade can be a buy or a sale.

AsxCode

CompanyName

OPY

Openpay Group Ltd

PLL

Pie Lithium Ltd

SZL

Sezzle Inc

Z1P

Zipco Ltd

6. Display the details of the client(s) whose name contains the word "sultan".

ClientId

ClientName

Email

Contact

101

ABC consultants

[email protected]

(02)92134000

7. Display the minimum, maximum and average traded price of OpenPay Group Ltd.

minimum

maximum

average

$2.27

$4.10

$3.24


Hint: A trade can be a buy or a sale.

8. Which client has been charged the least GST? Display the name(s) of client(s) and the total amount of GST.

ClientName

TotalGST

CQU Super

$5.43

Hint: Similar to question 3.
9. What is the total brokerage-charges for all the trades?

TotalBrokerage

$1,865.08


Hint: A trade can be a buy or a sale.

10. Display the lowest price paid for buying each of the company shares. Display the results in ascending order of ASXcode.

ASXcode

minimum

AYS

$0.61

BSA

$0.27

OML

$0.90

OPY

$2.27

PLL

$0.23

RDY

$1.38

SZL

$5.14

TAB

$0.28

Z1P

$6.30

Part B - Form
Use the given ShareTrade database and create the following two forms:
1) Main form that has a button to open the client form.
2) Client form that has buttons to add a new client record and to save the new record.
Sample forms have been shown below. You can have your own layout of the forms with additional functionalities; however the above-mentioned functionalities and your student Id & name should be available.

Part C - Report
Use the given ShareTrade database and create a Report object to display all the clients who have done trades. The report should display the results in ascending order of client name.

Hints:
1. Create a suitable query (ReportQuery)
2. Use Report Wizard to create the report object by using the ‘ReportQuery' and its required attributes
3. Use the design view to
a. Change the report title, labels and column headings suitably
b. Adjust the size of the controls

Attachment:- Database Design and Implementation.rar

Reference no: EM132949763

Questions Cloud

What is the cash conversion cycle for max company : What is the cash conversion cycle? MAX Company, a manufacturer of paper plates, has annual sales of $10 million, a cost of goods sold of 75 percent
What is the contractually promised rate of return on loan : The compensating balance is 4%, and there is 10% reserve requirement (RR). What is the contractually promised rate of return on this loan?
What is expected recovery from defaulted consumer loans : What is expected recovery from defaulted consumer loans (i.e., percent recovered value of contractually promised principal and interest payments)?
What is the impact of these on the balance sheet : Question - What are 3 fundamental decisions that are of concern the finance team? What is the impact of these on the balance sheet
Create a report object to display all the clients : Create a Report object to display all the clients who have done trades. The report should display the results in ascending order of client name
What is the expected return and risk on the loan : Bronte Bank is charging a 15 percent interest,What is the expected return on loan and the risk on the loan using the Moody's Analytics Portfolio Manager model?
What is the value of this firm net operating income : Given this information, what is the value of this firm's net operating income or net income before extraordinary income
Which of the statements about loan portfolio are false : Which of the statements about loan portfolio are False? The expected portfolio return is a weighted average of the expected returns of the individual assets.
Calculate the breakeven level of production : The company, which is currently operating at its full capacity, is considering a capacity-increase investment project. Calculate breakeven level of production

Reviews

len2949763

7/25/2021 10:31:30 PM

I have a small assignment which required some work on a small ms access db and a report.

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd