Aktham Mahmoud

Aktham Mahmoud

  • 1.4k
  • 707
  • 18.7k

Problem in group by syntax

May 2 2020 3:35 PM
Greeating all
I've problem with group by syntax in  SQL Visualstudio  
I've been trying many solutions but no way..
How to resolve that?
SQL Synatx:  

  1. SELECT        TOP (10) O_Id, OrderCode, DateOfOrder, Product_Name, SNO, Br_CodeID  
  2. FROM            Orders  
  3. WHERE        (OrderCode = OrderCode)  
  4. ORDER BY DateOfOrder DESC  
  5. GROUP BY OrderCode  
See photo  below:
 

Answers (5)