Questions tagged [json-each]

2 questions
0
votes
0 answers

Extract json records to rows in MySQL 5.7, like PostgreSQL json_each function

We have one business scenario: each id has sevaral codes, each code has "current, max, min" value. But each id's code are not same, so we use json to store them in PostgreSQL 12 {"code1":[cur,min,max], "code2":[cur,min,max],..." We want to extract…
yezhy
  • 1
0
votes
0 answers

How to use json_each with alias() to query in SQLAlchemy/SQLite?

I'm storing JSON documents in one of the columns of an SQLite table. The following query works fine if executed from the SQLite CLI SELECT jsonfield.value FROM dataset, json_each(dataset.samples) as jsonfield WHERE json_extract(jsonfield.value,…
LeMoussel
  • 5,290
  • 12
  • 69
  • 122