2
Это примерКак выполнить следующий запрос с помощью Postgres?
banzai=# select letter_id, length_id, word from words;
letter_id | length_id | word
-----------+-----------+-------
1 | 1 | run
3 | 1 | tea
2 | 1 | cat
2 | 2 | cast
2 | 3 | coast
1 | 3 | roast
1 | 2 | rest
3 | 2 | team
3 | 3 | toast
(9 rows)
banzai=# select letter from letters;
letter
--------
R
C
T
(3 rows)
banzai=# select length from lengths;
length
--------
4
5
3
(3 rows)
banzai=# select length, letter, word from words, lengths, letters where words.length_id = lengths.id and words.letter_id = letters.id;
length | letter | word
--------+--------+-------
3 | C | cat
3 | R | run
3 | T | tea
4 | R | rest
4 | C | cast
4 | T | team
5 | R | roast
5 | C | coast
5 | T | toast
(9 rows)
Я хочу, чтобы произвести следующую таблицу в HTML
R T C
3 run tea cat
4 rest team cast
5 roast toast coast
У меня есть метод в моей Java (бэкенд) код, который будет производить данные в формате JSON. Angularjs (внешний интерфейс) примет и представить JSON таблицу в HTML
поиск динамического стержня – JoeNahmias
спасибо, что я сейчас! – nevermind