Note that there are some explanatory texts on larger screens.

plurals
  1. POhaving an issue with mysql query to create views
    primarykey
    data
    text
    <p>Starting out with mysql and struggling with this issue, i would appreciate the help</p> <p>I have an example table for software sales like this, the id is auto incremented and the entries are made as they are downloaded</p> <pre><code> ID | App name | platform | release date |downloadDate |price ====+============+==========+=============+==============+====== 1 | calculator | windows | 2013-03-01 | 2013-01-21 | $10 2 | text editor| mac | 2013-04-07 | 2013-02-24 | $8 3 | mp3 player | mac | 2013-01-23 | 2013-01-12 | $12 4 | calendar | linux | 2012-08-15 | 2013-04-14 | $5 5 | mp3 player | windows |2013-02-11 | 2013-03-15 | $12 6 | text editor| linux |2012-10-13 | 2013-03-22 | $8 7 | calculator | mac |2013-04-24 | 2013-05-17 | $10 8 | mp3 player | linux |2013-04-16 | 2013-07-03 | $12 9 | text editor| linux |2013-03-22 | 2013-06-12 | $8 10 | calendar | mac |2012-08-15 | 2013-04-14 | $5 </code></pre> <p>what I'm trying to do is create 3 views to display the data </p> <ol> <li><p>show the App name and the total for all platforms for that App and order then descending that x would be the total for all platform (win/mac/linux)</p> <p>ex. </p> <pre><code>App name | total ===========+====== calculator | x mp3 player | x text editor| x </code></pre></li> <li><p>view show the App name and the total downloads for each platform and order then descending</p> <p>ex.</p> <pre><code>App name |platform |total ===========+=========+===== calculator | windows | 12 calculator | mac | 6 calculator | linux | 2 </code></pre></li> <li><p>show the App name and the total for all platforms for that App and order then by price descending</p> <p>ex.</p> <pre><code>App name | total |price ===========+=======+==== calculator | x |$10 mp3 player | x |$12 text editor| x |$8 </code></pre></li> </ol> <p>i have searched for an answer but could not find a very close case, it's a bit long winded post but it's as best as i can explain it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload