Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to have a table with various output on one row.
Cannot get results on one table row.

An example is like this where I get answer

I am using a pre 2012 version of MySQL for coding

What I have tried:

SELECT `Bowler`,`Date`,`Gm1`
FROM `b_Scores` 
WHERE `Gm1` > 200 and Date = 2016-09-20
group BY Team

SELECT `Bowler`,`Date`,`Gm1`
FROM `b_Scores` 
WHERE `Gm1` > 300 and Date = 2016-10-20
group BY League;
Posted
Updated 2-Mar-17 9:09am
Comments
Bryian Tan 2-Mar-17 22:15pm    
how the expected result should look like?
CHill60 3-Mar-17 7:24am    
You can't have things like Bowler, Date and Gm1 in the select if you are going to group by team. Can you post working queries and your expected results and we can help you get them into a single query
Member 12995602 3-Mar-17 19:05pm    
Here is a sample of working code that works separately or on 2 separate rows if a ";" is placed after the 1st code.

SELECT date,bowler,
SUM(Gm1+Gm2+Gm3)
FROM b_Scores
WHERE Week= 20 and TeamNum = 1
GROUP BY Bowler;

SELECT date,team,
SUM(Gm1+Gm2+Gm3)
FROM b_Scores
WHERE Week= 20 and TeamNum = 1
GROUP BY Team

What I need is a table with separate similar data on different rows by date.
Member 12995602 3-Mar-17 19:17pm    
for reference i am trying to program various items similar as this page.
https://brechinlanes.ca/wp-content/uploads/2013/06/MMIX_09-19-16.pdf

The results will be automatic rather than uploading a pdf file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900