次のスキーマを持つ 2 つのテーブルのレコードを結合しようとしました
users
----
name
phone
email
sales
----
seller_id
buyer_id
amt
date
ここに私のSQLがあります
Select
sales.amt,
sales.date,
buyer.phone as buyer_phone,
buyer.name as buyer_name,
buyer.email as buyer_email,
seller.phone As seller_phone,
seller.name As seller_name,
seller.email As seller_email
From
users borrower Inner Join
sales On borrower.id = sales.buyer_id Inner Join
users seller On seller.id = sales.seller_id
しかし、私は空のレコードを取得します
期待される出力は
amt,
date,
buyer_phone,
buyer_name,
buyer_email,
seller_phone,
seller_name,
seller_email
ヘルプや提案