I have to make a SQL statement which is taking values from three tables one table is table with users other with opinion and the third one is table with subject where are four foregin keys- one of the is pointing to opinion record and the rest as separate keys for users record.
How to select a record from this table which containd subject name, opinion value, subject proffesor and subject opinion guy?
Okay, it’s Saturday night and I’m feeling mellow enough to tackle this without a data model.
You have given us the names of the three lookup tables (subjects, opinions, users) but not the actual structures and columns. So I’m making some guesses.
I realize that this query almost certainly doesn’t fit your schema but it should give you some clues. Otherwise, please give us the table structures, primary and foreign keys, etc.