Jump to content

Search the Community

Showing results for tags 'php mysql grouping sum'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hello, Self taught guy here. Thanks for reading my post. I've made a app to track the sales of floating rubber ducks for a duck race. I have a database which contains data similar to this: id soldby buyerfirst buyerlast email package 1 Salesman 1 Dick Jones dickjones@isp.com 25 2 Salesman 1 Dick Jones dickjones@isp.com 25 3 Salesman 1 Dick Jones dickjones@isp.com 25 4 Salesman 1 Dick Jones dickjones@isp.com 25 5 Salesman 1 Dick Jones dickjones@isp.com 25 6 Salesman 1 Dick Jones dickjones@isp.com 25 7 Salesman 1 Dick Jones dickjones@isp.com 25 8 Salesman 1 Dick Jones dickjones@isp.com 25 9 Salesman 1 Dick Jones dickjones@isp.com 25 10 Salesman 1 Dick Jones dickjones@isp.com 25 11 Salesman 1 Dick Jones dickjones@isp.com 25 12 Salesman 1 Dick Jones dickjones@isp.com 25 13 Salesman 1 Dick Jones dickjones@isp.com 25 14 Salesman 1 Dick Jones dickjones@isp.com 25 15 Salesman 1 Dick Jones dickjones@isp.com 25 16 Salesman 1 Dick Jones dickjones@isp.com 25 17 Salesman 1 Dick Jones dickjones@isp.com 25 18 Salesman 1 Dick Jones dickjones@isp.com 25 19 Salesman 1 Dick Jones dickjones@isp.com 25 20 Salesman 1 Dick Jones dickjones@isp.com 25 21 Salesman 1 Dick Jones dickjones@isp.com 25 22 Salesman 1 Dick Jones dickjones@isp.com 25 23 Salesman 1 Dick Jones dickjones@isp.com 25 24 Salesman 1 Dick Jones dickjones@isp.com 25 25 Salesman 1 D Jones dickjones@isp.com 25 26 Salesman 2 Clarence Boddicker clbod@isp.com 6 27 Salesman 2 Clarence Boddicker clbod@isp.com 6 28 Salesman 2 Clarence Boddicker clbod@isp.com 6 29 Salesman 2 Clarence Boddicker clbod@isp.com 6 30 Salesman 2 Clarence Boddicker clbod@isp.com 6 31 Salesman 2 Clarence Boddicker clbod@isp.com 6 32 Salesman 3 Anne Lewis alewis@isp.com 1 33 Salesman 1 Alex Murphy murphy@isp.com 1 34 Salesman 1 Fred Friendly friendly@isp.com 1 There are three packages of ducks available to buy. 1 duck is $5, 6 ducks is $25 and 25 ducks is $100. Each Duck purchased is numbered and that number corresponds to the id column. Each time a sale is made the sale is entered into the db as a new record for each duck sold. Above, Dick Jones bought 25 ducks so each duck is its own record in the db (Dick Jones did not buy 25 orders of 25 ducks). Clarence Boddicker bought 6 ducks, Anne, Alex and Fred all bought one duck. Each had a different sales person although it could just as easily been the same sales person. I need to manipulate this data to show total ducks sold per sales person and total money earned per salesperson. Sold Buy Total Ducks Sold Total Money Earned Salesman 1 27 $110 Salesman 2 6 $25 Salesman 3 1 $5
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.