SELECT tidm, isin, substr(isin, 5, 7) AS sedol FROM stock;

tidm |     isin     |  sedol  
------+--------------+---------
BARC | GB0031348658 | 3134865