Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1
- select nume, nr_telefon
- from `client`, `client_telefon`
- where client.id=client_telefon.client_id;
- #2
- select nume
- from `client`, `client_email`
- where client.id=client_email.client_id;
- #3
- select nume, email
- from `client`, `client_email`
- where client.id=client_email.client_id;
- #4
- select count(email)
- from `client_email`;
- #5
- select distinct nume
- from `client`, `client_telefon`
- where client.id=client_telefon.client_id;
- #6
- select client.nume, produs.nume, comanda.cantitate, factura_produse.cantitate,sku
- from `client`, `produs`, `comanda`, `factura`, `factura_produse`
- where client.id=comanda.id_client
- and comanda.id_factura=factura.id
- and client.id=factura.client_id
- and factura_produse.factura_id= factura.id
- and factura_produse.produs_id=produs.id;
- #7
- select client.nume, produs.nume, sku, cantitate * (pret_unitar + (pret_unitar * tva))
- from `client`, `factura`, `factura_produse`, `produs`
- where client.id=factura.client_id
- and factura_produse.factura_id= factura.id
- and factura_produse.produs_id=produs.id;
- #8
- select sum(cantitate * (pret_unitar + (pret_unitar * tva)))
- from `client`, `factura`, `factura_produse`, `produs`
- where client.id=factura.client_id
- and factura_produse.factura_id= factura.id
- and factura_produse.produs_id=produs.id
- group by factura.id;
- #9
- select nume, stoc
- from `furnizor`, `furnizor_stoc`
- where furnizor.id = furnizor_stoc.furnizor_id;
- #10
- select nume, email
- from `client`, `client_email`, `factura`
- where client.id = client_email.client_id
- and client.id = factura.client_id
- and factura.nota = "redus";
- #11
- select nume, nr_telefon
- from `client`, `client_telefon`, `factura`
- where client.id = client_telefon.client_id
- and client.id = factura.client_id
- group by factura.client_id;
- #12
- select sku, atribut
- from `produs`, `produs_atribute`
- where produs.id = produs_atribute.produs_id
- group by produs.sku;
- #13
- select nume, stoc
- from `produs`, `produs_atribute`, `produs_stoc`
- where produs.id = produs_atribute.produs_id
- and produs.id = produs_stoc.produs_id
- and produs_atribute.atribut is not null
- and produs_atribute.valoare is not null
- #14
- select nume
- from `client`, `factura`
- where client.id = factura.client_id
- and client.tip_client = "juridic"
- group by factura.client_id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement