CREATE OR REPLACE VIEW vw_turn AS
SELECT
  ts.*,

  t.key AS turnid,
  t.elapsedtime,
  t.holeposition,

  b.key AS blockid,
  b.description AS block  
FROM
  tbl_turn t,
  vw_test ts,
  const_block b
WHERE
  t.testid  = ts.testid AND
  t.blockid = b.key
;