SAMPLE 3 For 9473718

0

Please login or register to vote for this query.

(click on this box to dismiss)

Amateur Radio

Q&A for amateur radio enthusiasts

WITH A As (
  SELECT 1 as ID, 100 rank , 'Name1' as Name
  UNION SELECT 1,    45,  'Name2'
  UNION SELECT 2,    60,  'Name3'
  UNION SELECT 2,    42,  'Name4'
  UNION SELECT 2,    88,  'Name5' )
, B AS (
SELECT 1 as ID, 'fn1' as FileName
UNION SELECT 2  , 'fn2')

--SELECT ID, rank, Name
--FROM A

SELECT MAX("ID")
FROM A


/*
SELECT *
FROM B
LEFT JOIN A
ON B.ID = A.ID
AND A.RANK = (SELECT MAX(A.RANK) 
              FROM A
              WHERE A.ID = B.ID
              )
*/

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results