create table tblUser
(
UserId int identity(1,1) not null,
UserName nvarchar(500),
Age int
)
INSERT INTO tblUser select 'Rahul',26
INSERT INTO tblUser select 'Yunus',26
create table tblTransaction
(
TransactionId int identity(1,1) not null,
UserId int,
Amount int ,
Status bit
)
INSERT INTO tblTransaction SELECT 1,200,1
INSERT INTO tblTransaction SELECT 1,2100,1
INSERT INTO tblTransaction SELECT 1,900,1
INSERT INTO tblTransaction SELECT 1,60,1
INSERT INTO tblTransaction SELECT 2,200,1
INSERT INTO tblTransaction SELECT 2,2100,1
INSERT INTO tblTransaction SELECT 2,900,1
INSERT INTO tblTransaction SELECT 2,60,1
INSERT INTO tblTransaction SELECT 2,55,1
SELECT * FROM tblUser
SELECT * FROM tblTransaction
SELECT * FROM tblUser as U
INNER JOIN
(
SELECT * FROM tblTransaction
WHERE
TransactionId IN
(
SELECT MAX(TransactionId)
FROM
tblTransaction
GROUP BY UserId
)
) AS [A]
ON
U.UserId=A.UserId
Showing posts with label USE SUBQUERY IN INNER JOIN. Show all posts
Showing posts with label USE SUBQUERY IN INNER JOIN. Show all posts
Thursday, February 28, 2013
USE SUBQUERY IN INNER JOIN
Subscribe to:
Posts (Atom)
How cache can be enabled for embeded text as well for search query results in Azure AI ?
Great question, Rahul! Caching in the context of Azure AI (especially when using **RAG pipelines with Azure OpenAI + Azure AI Search**) can...
-
The error message you encountered ("DeleteService FAILED 1072: The specified service has been marked for deletion") indicates tha...
-
The error message you're seeing indicates that the "global using directive" feature is currently unsupported in the version o...
-
Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...