私のテーブル構造:
Lantern
Lantern_type
Location
Loan
Borrower
私のクエリは重複を返します。繰り返しデータを含まないソリューションを探しています。
コード
SELECT
l.lantern_id, l.lantern_name, l.lantern_state,lt.lantern_type,
lt.lantern_type_description, lt.lantern_type_tech_info,
lt.lantern_type_lens, lo.location_id, lo.location_name, loa.loan_id,
loa.loan_start_date, loa.loan_end_date, b.borrower_id, b.borrower_name, b.user_id
FROM lantern as l
INNER JOIN lantern_type as lt
ON l.lantern_id = lt.lantern_type_id
INNER JOIN location as lo
ON lt.LANTERN_TYPE_ID = l.lantern_id
INNER JOIN loan as loa
ON lo.LOCATION_ID = loa.LOAN_ID
INNER JOIN borrower as b
ON loa.loan_id = b.borrower_id
;