Good challenge! It was a good practice problem to refresh my memory on SQL.
What Bradford did wrong was he put the Lname instead of Fname in the WHERE statement, he should have sorted by ASC instead of DESC, and he did not put the name Brian in the WHERE statement.
Here’s what Bradford did wrong:
-Query 1: He put LName instead of FName in the WHERE statement.
-Query 2: He ordered the Location by DESC, not ASC.
-Query 3: He didn’t include “Brian*” in his WHERE statement.
1 Like
Bradford’s mistakes: Used LName in the WHERE statement, sorted the data the opposite way, forgot to search for Brian in the WHERE statement.
It looks like in the first one he put the last name in the where statement instead of first name so it returned the last names that start with B instead.
On the second one he sorted the locations in reverse alphabetical order and needs to take out the DESC that is probably in there.
On the third one, he seems to have forgotten the name Brian after the WHERE part. He needs to add in that name in order to see the full results.
This was a fun challenge! Im excited to continue to learn more about SQL. Here are the mistakes I found.
For the first query:
- Bradford used the wrong column (
LName) in the WHERE clause instead of FName, leading to incorrect filtering.
For the second query:
- Bradford used “DESC” in the ORDER BY clause, causing the results to be sorted in descending order instead of alphabetically.
For the final query:
- Bradford omitted “Brian” from the WHERE statement, resulting in an understatement of the records retrieved.
3 Likes
I practiced writing the SQL code, then checked my answers against the Solutions. I found these mistakes:
- He used LName instead of FName in his WHERE function
- He ordered by Location descending instead of ascending
- He left “Brian” out of the WHERE statement so there were less rows
That’s awesome you typed out all the correct code. Great work!
Based on the correct return results, Bradford’s problem in his first query is that he requested records with employees’ last names that start with B, not first names. In his second query, he ordered the location in reverse alphabetical order. In the last query, Bradford forgot to include “Brian” in the WHERE statement.
Bradford made mistakes in his SQL statements. In the first he included the LName in the WHERE statement, in the second he made put DESC after d.Location in the ORDER BY statement, changing the order of the query. Lastly, Bradford forgot to search for Brian in his final WHERE statement.
In examining the notes above and the attached solution files, I was able to deduce Bradford’s errors
–He included LName in the WHERE statement instead of FName (1)
–He ordered d.Location as DESC instead of ASC. (2)
–He left “Brian” out of his WHERE statement. This meant onlt Brent and Bradford were displayed. (3)
I appreciate your clarity of response. You nailed the problem!
I thought I was supposed to fix the queries, but I need to go through the instructions and find his mistakes.
- Where statement shouldn’t include LName.
- Sorted the data wrong.
- Didn’t include Brian.
Here’s what I think was wrong:
- Barry used LName where he should have used Fname in the WHERE sequence
- Barry should have left the ORDER BY statement blank or put ASC rather than DESC so it was ordered improperly. Order By will assume ASC order unless told otherwise
- Barry forgot to include “Brian” in the WHERE sequence
First query , Bradford used ‘LName’ in the WHERE clause instead of ‘FName’.
In the second query, he sorted the list in descending order by location, instead of ascending.
Last query, Bradford forgot to include the name ‘Brian’ in his WHERE statement
1 Like
Okay, here is what I noticed about Bradford’s queries.
- He used the LName instead of the FName for his first query in the WHERE clause.
- Barry sorted the reverse of what he needed to by using the DESC instead of leaving it blank or using ASC.
- In his last query, Barry did not use Brian in his WHERE statement so he only got the results of Brent and Bruce.
1 Like
In the first one, he had L.LastName instead of L.First Name
In the second he made d.Location DESC in the OrderBy Column
In the last one, he forgot Brian in the WHERE Statement
Also, I tried to save and post my access queries but I could not get it to save to a folder or pull up from my desk top. But I am just following the leader and explaining what was wrong with the queries.