Jul-30-2018, 05:34 PM
(Jul-30-2018, 05:28 PM)Huck Wrote: I kept getting blue = 7 until I put that break in the first loop. I didn't think I needed it either.It was the loop that is a problem, the break was a way to solve the problem caused by the unnecessary loop. You were getting 7, because with the loop if id is double-digit, it will count it twice, i.e. every double-digit id is double-counted, if you had 3-digit ids, they will be triple-counted, etc.
try to find a way to explain what you are doing and let us know. Also it MAY be possible to fix the sql statement itself.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs