aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/select/dict_lookup_by_key.sql
blob: 9a7feebcaec0997316c8d82182b2f566d3b18fda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* syntax version 1 */
/* postgres can not */
$key_text = AsDict(
    ('911', 'emergency'),
    ('200', 'two hundred'),
    ('150', 'one and half hundred'),
    ('023', 'funny'),
    ('075', '3/4 of hundred')
);

SELECT
    value,
    $key_text[key] as key_text
from plato.Input;