I have four tables and I need to fetch data from one table with where condition and the output contains ID's from three different tables using those ID's need to get the names of them.
Company:
CompanyID - PK
CompanyName
CompanyDescription
Users:
UserID - PK
FirstName
LastName
Email
TaskDetails:
TaskID - PK
CompanyID - FK of Company.CompanyID
TaskStatus:
TaskStatusID - PK
TaskID - FK of TaskDetails.TaskID
Status
Details
CreatedBy - FK of Users.UserID
UpdatedBy - FK of Users.UserID
CreatedAt
UpdatedAt
Need a query to return something like below:
CompanyName,Email,Status,Details,CreatedAt,UpdatedAt with where condition on TaskStatus table TaskStatus.UpdatedBy!=1 and TaskStatus.UpdatedAt>'2013-08-01' and TaskStatus.status='COMPLETED'