as_table.sql 347 B

1234567891011121314
  1. /* postgres can not */
  2. $data = AsList(
  3. AsStruct(1u AS Key, "v1" AS Value1, 100 AS Value2),
  4. AsStruct(2u AS Key, "v2" AS Value1, 200 AS Value2),
  5. AsStruct(3u AS Key, "v3" AS Value1, 300 AS Value2));
  6. SELECT Key, Value2 FROM AS_TABLE($data);
  7. $input = (
  8. SELECT * FROM AS_TABLE($data) WHERE Key > 1
  9. );
  10. SELECT Key, Value1 FROM $input;