|Join Nairaland / LOGIN! / Trending / Recent / New|
Stats: 2,801,751 members, 6,696,865 topics. Date: Friday, 28 January 2022 at 10:52 PM
|Please I Need A Help In Solving This Problem by bamigboye27: 10:33pm On Sep 27, 2013|
The table below captures a weekly sales data for a small retail shop
Product/day 1 2 3 4 5 6
Milk 20 45 20 40 50 35
Sugar 30 10 90 45 15 60
Notebook 10 20 80 12 15 50
File 34 24 50 16 25 50
Pencil 56 43 12 15 20 35
Biro 23 59 20 10 40 30
Develop a program to determine the following
(i) Total sales for that week
(ii) The product with highest total sales in the week
(iii) The total amount of sales for two products (e.g. biro and pencil)
|Re: Please I Need A Help In Solving This Problem by spikesC(m): 10:40pm On Sep 27, 2013|
What language, what database.
What's the problem about, is it school stuff?
|Re: Please I Need A Help In Solving This Problem by adewasco2k(m): 9:50am On Sep 28, 2013|
@OP If you know just very little of php and MySQL you will be done in a matter of minutes.
Let me just make assumptions because you didn't give much details
1. Create a table in your database (e.g MySQL) normalization might even be ignored, but if you are concern about performance, you should do it.
If you want to normalize you can create a table for products, with ID's (Auto incremented) and a table for days also auto incremented another table for sales,
So you have the sales id, DATE, product_id, day_id
So all you need to do is query your tables, you will be using much of SUM and COUNT to get total sales and number of sales for any day or even a week or month, the DATE column will help.
My advice, start something then come back if you need help.
Final advice, Your database is not your spreed sheet, like excel, must newbies will create a table just likeyou have above.
|Re: Please I Need A Help In Solving This Problem by talk2hb1(m): 11:09am On Sep 28, 2013|
Let me go and learn how to develop facebook first, I will come back to that.
|Re: Please I Need A Help In Solving This Problem by adewasco2k(m): 1:42pm On Sep 28, 2013|
talk2hb1: Let me go and learn how to develop facebook first, I will come back to that.
That will be after you finish teaching me wordpress development right?
|Re: Please I Need A Help In Solving This Problem by talk2hb1(m): 1:51pm On Sep 28, 2013|
The OP is looking for answer to his assignment, without acknowledging it.
Every dick and harry will come to nairaland with their skool assignment to be solved.
|Re: Please I Need A Help In Solving This Problem by Djtm(m): 2:27am On Sep 29, 2013|
talk2hb1:it is still better than dubbing.
|Re: Please I Need A Help In Solving This Problem by talk2hb1(m): 9:17am On Sep 29, 2013|
I am not against anybody posting his or her assignment here, but they need to acknowledge.
|Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health |
religion celebs tv-movies music-radio literature webmasters programming techmarket
Nairaland - Copyright © 2005 - 2022 Oluwaseun Osewa. All rights reserved. See How To Advertise. 33