46|SQL – Barry Bee Benson Co

For the first query, Bradford shouldn’t have used LName in his WHERE statement. He should have used FNAME.
For the second query, the ORDER BY statement should have been in ASC (ascending) instead of DESC, which he used.
For the last query, Bradford didn’t include “Brian” in his WHERE statement

Bradford’s first error was that he put LName instead of FName in the WHERE statement of his first SQL. Then, for his second SQL, he should have sorted the data in ascending order rather than descending. Lastly, in his last SQL, Bradford forgot to search for Brian in his WHERE statement in his SQL.

While creating the three SQL queries Bradford made three mistakes:

  1. When creating the WHERE statement he used LName (last name) instead of filtering for FName (first name)
  2. He sorted data in ASC when he should have sorted in DESC order.
  3. In his final SQL query he omitted seaching for “Brian” in the WHERE statement

In the first query Bradford put the LName in the WHERE CLAUSE rather than the FName

In the second Query Bradford sorted DESC rather than ASC in his ORDER BY clause

In the third query Bradford did not search for Brian in his WHERE cllause

1 Like

Bradford’s mistakes:
Solution 1) He put LName in the WHERE statement
Solution 2) He put the data in the opposite order, should be sorted in ASC
Solution 3) He left out the name “Brian” in the WHERE statement

  1. Bradford substituted LName for FName in the WHERE clause.
  2. Bradford arranged the data in an ascending order rather than a descending one.
  3. He failed to look for Brian in the WHERE clause.

Here are the solutions I got!
Solution 3
Solution1
Solution2

3 Likes

Great refresher on SQL!
The 3 mistakes were that Bradford listed LName instead of FName in the WHERE statement, the data was sorted in ASC instead of DESC order, and he didn’t search for Brian in the WHERE statement.

He used first name in the Where not last name
He Order BY location DESC not ASC
He didnt include brian in the Where statement.

In Bradford’s queries
1.) He should have put FName in his WHERE statement but instead he put LName.
2.) In this query he put the list of locations in descending order or reverse alphabetical order instead of using ascending order.
3.) In the last query he should have included Brian in his WHERE statement but he forgot it.

1 Like

Mistakes:

  1. In the first query he listed LName in the WHERE portion when we should have used FName.

  2. He ordered his data in ascending order and not descending order.

  3. Brian was completely excluded from the query in the WHERE statement.

What I saw helped me out is realizing that Bradford made several errors in his SQL query. First, he mistakenly used the LName field in the WHERE clause instead of the FName field. Additionally, he improperly configured his table by appending a DESC command to d.Location. Furthermore, he omitted “Brian” from his query.

This very much helped me to get a jump start back into SQL.

Thank You

Thanks for the challenge! The walkthrough was very good as well.

For the first problem, Bradford put Lname instead of Fname
For the second, he sorted by desc instead of asc
For the third, he forgot to search for Brian and only searched for Brent and Bruce

Here are Bradford’s mistakes that I found: (1) He used LName instead of FName in the WHERE clause to find first names with the letter “B”. (2) He did ORDER BY location descending instead of ascending. (3) He forgot to include “Brian” in the WHERE statement.


Here is my SQL Code for the first Query. Having just started studying SQL it definitely took me a little while, but I think I understood it!

  1. We included LName in the WHERE
  2. ordered Location as DESC not ASC
  3. I leave Brian out of the where clause
1 Like

This is awesome! All of your code is super clear and looks like it worked great!

  1. Bradford used the Last Name instead of the First Name in the WHERE clause for his query.
  2. Bradford probably sorted the Location in Descending order in the ORDER BY clause instead of the default Ascending order.
  3. Bradford forgot to include LIKE “Brian*” in the WHERE clause of his query.

Thank you for the challenge and the solution video, very helpful.

Good practice!

  • In the first query, Bradford messed up by using “LName” instead of “FName” in the WHERE part.
  • In the second query, he got mixed up and sorted the locations in the wrong direction – should have been from small to big, not the other way around.
  • In the last query, Bradford missed out on including the name “Brian,” which ended up making the list smaller than he wanted.

This being my first SQL challenge, I ended up needing to reference the solution file several times. I mostly followed the solution file and tried to notice the reason for the changes. This was a nice challenge to get my feet wet with SQL.

In the first problem Bradford used LName in the WHERE section instead of FName.
In the second problem, Bradford must of ordered d.location DESC.In the last problem, Bradford forgot to put Brian into WHERE Statement.