我想做这个SQL查询:
SELECT
*
FROM
facture;
select
sum(lignevente0_.montant_ht) as col_4_0_
from
ligne_vente lignevente0_,
commande commande3_
inner join
client client4_ ON commande3_.client_id = client4_.id
inner join
stock stock5_ ON lignevente0_.stock_id = stock5_.id
cross join
facture facture1_,
commande commande2_
cross join
lot lot7_
cross join
produit produit8_
cross join
fournisseur fournisseu11_
where
lignevente0_.commande_id = commande3_.id
and facture1_.commande_id = commande2_.id
and stock5_.lot_id = lot7_.id
and lot7_.produit_id = produit8_.id
and lot7_.fournisseur_id = fournisseu11_.id
and lignevente0_.commande_id = facture1_.commande_id
and facture1_.id = 1
group by facture1_.no_facture , produit8_.tva_id , fournisseu11_.type_fournisseur_id
order by facture1_.no_facture;
我遇到了执行错误:
错误代码:1054。'on'中的未知列'lignevente0_.stock_id' 条款“
但是ligneVente确实有一个stock_id列 我不知道我在哪里错了。