Answer the question
In order to leave comments, you need to log in
SELECT PostgreSQL?
Guys, SQL is not strong at all, but you need to make a query of this nature:
you need to display the title of the question (new_question.title) from the answer table where (new_1answers.a) = 'no'
It seems not so difficult, but the output is always wrong.
Table with answers:
create table new_1answers
(
id_report integer
constraint new_1answers_id_report_fkey
references new_1report,
id_question integer
constraint new_1answers_id_question_fkey
references new_question,
a varchar(8)
);
create table new_question
(
id_question serial not null
constraint new_question_pkey
primary key,
title text
);
Answer the question
In order to leave comments, you need to log in
SELECT *
FROM new_1answers
JOIN new_question ON new_question.id_question = new_1answers.id_question
WHERE new_1answers.a = 'no'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question