Resolved SQL Help using specific statements listed in forum

jag250

Active member
Joined
Sep 16, 2020
Messages
28
Programming Experience
1-3
USing theses Statements
    • no Table SELECT
    • SELECT FROM
    • WHERE
    • AND, OR, NOT, IN, LIKE
    • GROUP BY
    • HAVING (which also implies a join and a group by)
  • MC/TF portion
    • all multiple choice and True False


1. Show ship countries and a count of orders by Ship Country. Include orders placed in 1997 and shipped to Belgium, Mexico, and Poland.

2. Show year of order (YEAR(OrderDate)) and a count of orders by year of order. Only include orders after 1997. Include years with more than 40 counts of order.

3. Show ShipCountry, ShipCity, and the average Freight by by ShipCountry and then ShipCity.

4. Show a list of CustomerIDs, OrderID, ShipCountry and year of shipping (YEAR(ShippedDate)). Only include orders in 1996 and CustomerID begins with the letter E.

5. Show a list of CustomerIDs, OrderID, and Freight charges. Only include customers where their freight charges were over $30. Order by CustomerID and then OrderID. The freight charges shown in the table is in dollar. Create an additional column and show the freight charges in euros (1 Dollar = 0.86Euro).
 
---4. Show a list of CustomerIDs, OrderID, ShipCountry and year of shipping (YEAR(ShippedDate)). Only include orders in 1996 and CustomerID begins with the letter E.
SELECT CustomerID,
OrderID,
ShipCountry,
ShippedDate
From Orders
Where ShippedDate = '1997' AND CustomerID = 'E%'
It wont run so I'm missing something....
What error(s) do you get back?
 
And for your information, I do all of my work myself and I have pieces done their just not correct. So I'm looking for someone who can give me an example based of these question and explain it.
It's not our job to teach you from scratch. If you need help with an issue then explain the issue and provide all the relevant information. Also, don't expect us to know your character as if by magic. You could be the most honest person in the world or the most dishonest and we wouldn't know, so why get offended that we don't assume the former? All we know is what you show us so show us. If you've done the work and you need help with a specific issue then show us the work and explain the issue. We're here because we want to help but we have expectations of those we help too. They're not difficult to fulfil, especially as you indicate that you already have all the information that you have been repeatedly told that you need to provide. We don't want to have to keep explaining what is required for a good question. We just want to read a good question and answer it. If you provide a good question, that's what will happen.
 
This is not an assignment. I'm just using different practice sheets my teacher gave me and looking for examples based on these questions.
You could help us to help yourself by providing us with a copy of your database or it's structure. Why? Because it's easier for some of us to write out the queries and execute them.
It would also help to know what project type you are using to test these queries in. Ie is it a Asp.net project, or some other C# related project?
Look at line 28 and line 36, and confirm the proper titles you are also using on p1#7. Notice anything?
Line 29 and 37 also have different capitalisation cases on those lines. ie : OrderID and OrderId. You've created a case sensitive issue if either of them are wrong, and this will cause you problems.
 
And this is still a C# forum, where's the C# code?
It's not our job to teach you from scratch. If you need help with an issue then explain the issue and provide all the relevant information. Also, don't expect us to know your character as if by magic. You could be the most honest person in the world or the most dishonest and we wouldn't know, so why get offended that we don't assume the former? All we know is what you show us so show us. If you've done the work and you need help with a specific issue then show us the work and explain the issue. We're here because we want to help but we have expectations of those we help too. They're not difficult to fulfil, especially as you indicate that you already have all the information that you have been repeatedly told that you need to provide. We don't want to have to keep explaining what is required for a good question. We just want to read a good question and answer it. If you provide a good question, that's what will happen.
I was not expecting anything. And thank you another staff member has already told me so get off my back. there is no need to respond at this point. I figured it out myself. If you took the time and read the conversation above you would have seen me discuss with the other guy that I was looking for EXPLANATIONS, not answers. I shared the code that I had at the time. So all of you stop breathing down my neck and chill! I will get offended if I please because you all respond, you act like you know everything and then lecture me. If I wanted to be lectured, I would call my parents.
 
Back
Top Bottom