add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE tbl (ID INTEGER, ticker TEXT, desc TEXT);

INSERT INTO tbl (ID, ticker, desc) VALUES
(1, 'GDBR30', '30YR'),
(2, 'GDBR10', '10YR'),
(3, 'GDBR5', '5YR'),
(4, 'GDBR2', '2YR');

SELECT * FROM tbl
WHERE ticker in ('GDBR10', 'GDBR5', 'GDBR30')
ID ticker desc
1 GDBR30 30YR
2 GDBR10 10YR
3 GDBR5 5YR
WITH cte(id, ticker) AS (VALUES (1, 'GDBR10'), (2, 'GDBR5'), (3, 'GDBR30'))
SELECT t.*
FROM tbl t INNER JOIN cte c
ON c.ticker = t.ticker
ORDER BY c.id
ID ticker desc
2 GDBR10 10YR
3 GDBR5 5YR
1 GDBR30 30YR