Question: My table name is `tblEvent` and its columns are `EventID`, `Name`, `Description`, `EventTypeID`, `TotalBudget`, `CustomerID`, `EventStatus`, `EventDate`

I want to select the latest 3 records. 

I have tried this:

```
public DataTable HomeEvents()
{
    string query = "select TOP 3 tblEvent.*, tblCustomer.Name as 'CustomerName', tblCustomer.Photo AS 'CustomerPhoto' from tblEvent ORDER BY EventID DESC, tblCustomer where tblEvent.CustomerID = tblCustomer.CustomerID";

    List<SqlParameter> lstParams = new List<SqlParameter>();
    DataTable dt = DBUtility.SelectData(query, lstParams);
    return dt;
}

```

Answer: 
The `order by` clause should be after the `where` clause:

```
select top 3
  tblEvent.*,
  tblCustomer.Name as 'CustomerName',
  tblCustomer.Photo AS 'CustomerPhoto'
from
  tblEvent
where
  tblEvent.CustomerID = tblCustomer.CustomerID
order by
  EventID desc,
  tblCustomer

```

Note: If `EventID` is auto-incremented (primary key, identity) and the records are actually created in the order that they occured, then the field would be in increasing order over time. Otherwise you would need to use the `EventDate` field for sorting (as Tareq Alothman suggested).
As Guffa said, Order By comes after where, and you need to 
"Order By EventDate DESC"