Why is it when I get stuck and ask for the solution, it gives me what is already on the screen? After I do the task and RUN it, an error comes up at the bottom. I ask for the SOLUTION, and it gives me the same answer I put up but then a green check is there. Did I do it wrong or right?
Before picking the solution, copy all your code and paste it into your text editor, then when the solution appears, copy and paste it, as well; then compare the two.
The difference can be subtle and in some cases almost trivial. The SCT has a limited range of checking options and is not exhaustive.
From my experience the learning environment interface is sometimes buggy and there is no sure fire way to get around it. I end up doing lots of refreshes, Reset, etc. Just be sure to have a copy on hand of your latest work so you have some place to restart from.
Thanks for the help, mtf. But seriously, right now, I am feeling a little overwhelmed. I may be one of those people who can’t learn on their own. I may need a classroom. I mean, it seems to be going so slow and I feel as if I’m not learning anything. Any suggestions?
Hello, Lynne. I hope you kept going. Learning to code is a challenge, and like learning anything else, we have to stick to it. (Sometimes a break – for a minute, a day, a week, or longer – is helpful. While you take a break on one language, give another a shot.)
This code the Aggregate Functions challenge doesn’t make sense to me:
SELECT COUNT(*) AS COUNT
FROM users
WHERE email LIKE ‘%.com’;
I have no clue as to why we use the ‘AS’ clause in this as well as keep getting confused as to the ‘%’ spacing on every question because sometimes it’s ‘whatever%’ or '%whatever%'or ‘%whatever’ and they all mean different things
When you run the script, you see that the column name in the Query Results is presented as count rather than COUNT(*). As the programmer, you understand the difference. If you are coding this for someone else’s use, that person (customer, perhaps) won’t necessarily know what COUNT(*) means.
Here’s an analogy from the everyday world: acetylsalicylic acid is commonly known as aspirin. Which of those is meaningful to the non-expert?
So its more for courtesy of others than it is actually required to pass the exercise? lol They mentioned nothing about adding an AS clause so i never though of it. Here I was doubting my ability lol
It never occurred to me to use the AS clause until I compared my query results to the provided hint Makes sense - I know I wouldn’t want to provide a data set to someone else with COUNT(*) as one of the column headers. Wish I’d remember to apply a basic SQL concept
This is not an error. The difference comes from the fact that the code embeded in the hint is preceeded by the words as an example. And there is an explanation just below the code snippet.