Create and save a data entry form to input more records into the table. Use the
ID: 666791 • Letter: C
Question
Create and save a data entry form to input more records into the table. Use the form to add 10 more records and save the database with the extra records. Create SQL queries to do the following:
Display the total ticket sales to males
Display each event (only once) in all upper-case letters
Display the total number (not $ amount) of sales of Rodeo tickets
Save all 3 queries.
Finally, export the entire table to an Excel spreadsheet and save it. Submit the database file with your form, the records you added and your queries, and also submit your Excel file.
Can anyone help me with the steps needed to complete this assignment?
ArenaTicketSales ID Event Day Gender Sales 1 Arena Football Monday M $200.00 2 Tractor Pull Monday M $300.00 3 Tractor Pull Monday F $100.00 4 Rodeo Monday M $250.00 5 Rodeo Monday F $300.00 6 Rodeo Tuesday M $100.00 7 Rodeo Tuesday F $175.00 8 Arena Football Tuesday M $175.00 9 Arena Football Tuesday F $50.00 10 Tractor Pull Tuesday M $100.00 11 Arena Football Wednesday M $50.00 12 Tractor Pull Wednesday M $100.00 13 Rodeo Wednesday M $100.00 14 Rodeo Wednesday F $125.00Explanation / Answer
first of all, It depends on what database you are using. There are many ways you can do it.
You can use, Microsoft Access or Oracle or MySql etc.
MS Access is more easy to create a table and form.
Steps to do Assignment :
Step 1 : creaate table ArenaTicketSales
Create table ArenaTicketSales(
ID number,
EVENT varchar(80),
DAY varchar(10),
GENDER varchar(1),
SALES number);
Step 2.: creating form to enter data to save to table
Here its not clear. no of options here as well.
- Form can be created with any language like Java swing UI or java wed (HTML with JDBC?
- using MS Access, we can create.
- Manually with insert queries you can enter data
insert into ArenaTicketSales values(1,'Arena Football','Monday','M',200);
insert into ArenaTicketSales values(2,'Tractor Pull','Monday','M',300);
.
.
etc
Step 3 : SQL Queries
a) Display the total ticket sales to males - ie.; total of sales for Gender Male
select sum(SALES) from ArenaTicketSales where GENDER = 'M'
b) Display each event (only once) in all upper-case letters - i.e; distinct of event in upper case. SQL has i build functions distinct and upper which does returning distinct values and converting given text to upper case respectively.
select UPPER(distinct(EVENT)) from ArenaTicketSales
c) Display the total number (not $ amount) of sales of Rodeo tickets - i.e; no of tickets sold for event Rodeo. using count in built function of SQL we can get no of rows, that gives no of tickets. with Where clause for specific event we will get no of tickets for that event
select count(*) from ArenaTicketSales where EVENT = 'Rodeo'
Step 4: EXport table - You can export table as .CSV file. (.CSV file is comma separated file, which can be opened in Excel and save in Excel format). it depends on DB you are using and tool (Visual tool or linux/unix iSql terminal etc).
Step 5 : Submit of your work
- You can get DB dump file, which will have all the schema details along with Data. You can submit this as database file.
- your insert statements
- submit the .CSV file (exported table as .CSV file)
This should give you idea how and What needs to be done. If you have more queries, Please reach us, We are here to help you.
Thank you
1 Arena Football Monday M $200.00 2 Tractor Pull Monday M $300.00Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.