Sunteți pe pagina 1din 8

FACULTATEA DE STIINTE ECONOMICE SI ADMINISTRATIVE

CONTABILITATEA SI INFOMATICA DE GESTIUNE

PROIECT:
Gestiunea clientilor unei entitati private

Introducere

RCS & RDS este o companie romaneasca rezultata in urma fuziunii in august 2005
intre Romania Cable Systems si Romania Data Systems. Compania este cel mai important
furnizor de servicii integrate de comunicatii avand peste 90 de puncte de lucru in Romania,
Ungaria si Slovacia.
Peste 1.000.000 de clienti beneficiaza de serviciile de televiziune prin cablu si satelit, iar
peste 150.000 de companii folosesc serviciile de internet, transmisii de date si telefonie fixa
oferite de RCS&RDS.
In prezent, RCS&RDS ofera urmatoarele tipuri de servicii:
Televiziune:
-Analogica prin cablu
-Digitala prin cablu
-Digitala prin satelit
-Televiziune prin cablu HD
Internet:
-Internet prin friba optica sau
--Internet prin friba optica (Fiberlink)
--Internet prin cablu (Cablelink)
-Internet mobil
--Internet mobil prin modem USB
--Internet mobil pe telefon mobil
--Internet mobil pe telefon fix fara fir
Telefonie fixa:
-Telefonie fixa cu fir
-Telefoine fixa fara fir
Telefonie Mobila:
-Abonament
-Prepaid

1.Crearea bazei de date


CREATE DATABASE rcs_rds

2.Crearea tabelelor
CREATE TABLE clienti(nr_crt INT(3),nume CHAR(20),prenume VARCHAR(20),cnp
BIGINT(13),adresa VARCHAR(35),telefon NUMERIC(12),PRIMARY KEY (nr_crt))

CREATE TABLE servicii(nr_crt INT(3),serviciu CHAR(10),subserviciu VARCHAR(25),nr_factura


NUMERIC(6),totalplata DOUBLE,PRIMARY KEY (nr_crt))

3.Inserarile in tabele

Inserarea datelor in tabelul clienti


INSERT INTO clienti(nr_crt,nume,prenume,cnp,adresa,telefon) VALUES (1,'Anghelescu','Florin
Mihai',1900304125431,'Vulturilor 16, Galati',0724563965),
(2,'Petcu','Alexandru',1670709321543,'Albastrelelor 2, Resita',0764367532),
(3,'Marnea','Cristian',1860602432653,'Fagarasului 12, Resita',0744643842),
(4,'Ciotea','Florin',1640806673640,'Mihai Viteazu 35, Bucuresti',0766168760),
(5,'Vasilescu','Alexandru',1860802157953,'Victoriei 32, Constanta',0770687225),
(6,'Mandruta','Andrei Cristian',1920907549921,'Galati 34, Satu Mare',0763398787),
(7,'Atodiresei','Stefan',1890509658752,'Baladei 9, Constanta',0776842396),
(8,'Danciu','Viorel',1760608535264,'Victoriei 17, Constanta',0760684158),(9,'Schiopu','Adrian
Florin',1900702534652,'Pomor 17, Alexandria',0768964852),
(10,'Burgoni','Elena',2870603532652,'Republicii 21, Resita',0728065423),
(11,'Cinta','Dorel',1760709165676,'Trandafirilor 14, Deva',0745958862),(12,'Danaila','Ionut
Stelian',1870209966375,'Firilor 12, Galati',0726753853),
(13,'Sultan','Andrei',1940701968159,'Revolutiei 1, Arad',0766741963),
(14,'Antin','Rudolf',1901109902852,'Margaretei 3, Timisoara',0735784561),(15,'Vlad','Cristina
Daniela',2870924258963,'Muncii 3, Resita',0769789632),
(16,'Ignat','Madalina',2951123096410,'Rotarilor 23, Timisoara',0744789630),
(17,'Banta','Octavian',1640930258852,'Musafirilor 2, Ploiesti',0726998563),
(18,'Vasilescu','Roxana',2880102857745,'Revolutiei 8, Constanta',0730729813),
(19,'Mihnea','Dorian',1891209744159,'Fetesti 24, Calarasi',0744963852),
(20,'Albu','Dumitru',1870925753869,'Rodnei 2, Oradea',0761758412),(21,'Mitru','Stelian
Florian',1720619741951,'Constructiilor 13, Botosani',0722852751),
(22,'Belocovici','Adrian',1900412952368,'Calnicel 12, Resita',0772968745),
(23,'Ardelean','Grigore',1690324174963,'Aviatorilor 1, Constanta',0741963582),
(24,'Liublici','Andreea',2900207851742,'Florilor 28, Timisoara',0761852957),
(25,'Siroda','Laurentiu',1821128785412,'Cotroceni 3, Brasov',0731859023)

Inserarea datelor in tabelul servicii


INSERT INTO servicii(nr_crt,serviciu,subserviciu,nr_factura,totalplata) VALUES

(1,'internet','fibra optica',135354,45),(2,'internet','cablelink',136754,34.4),
(3,'internet','fiberlink',465354,32.2),(5,'internet','mobil modem',138764,34.6),(6,'internet','fibra
optica',157354,39.6),(7,'internet','cablelink',135694,32.5),(8,'internet','fiberlink',156354,34.6),
(9,'internet','mobil modem',135354,40.5),(10,'internet','fibra optica',135976,47.1),
(11,'tv','analogic cablu',245674,35.6),(12,'tv','digital cablu',567354,34.5),(13,'tv','digital
satelit',135354,45),(14,'tv','cablu HD',567965,38.3),(15,'tv','analogic cablu',157784,38.5),
(16,'tv','digital cablu',789354,36.6),(17,'tv','digital satelit',567354,32.5),(18,'tv','cablu
HD',455674,54.6),(19,'tv','digital cablu',567354,36.7),(20,'tv','digital cablu',788354,67),
(21,'telefonie','fixa cu fir',788564,57),(22,'telefonie','mobila',789054,34),
(23,'telefonie','mobila',578854,56),(24,'telefonie','fixa fara fir',578893,68),(25,'telefonie','digital
cablu',788354,45)

Afisarea tuturor persoanelor dupa introducerea numelui


select * from clienti where nume='Danciu';

Cautarea persoanei dupa cnp


select * from clienti where cnp=1900702534652;

Afisarea celor care au serviciul internet


SELECT * FROM servicii WHERE serviciu='internet';

Afisarea celui cu cea mai mare suma pe factura:

SELECT MAX(totalplata) FROM servicii;

Numararea celor care au serviciul TV:


SELECT COUNT(serviciu) FROM servicii WHERE serviciu='tv';

Afisarea serviciului,subserviciului si total suma celor care au totalul sumei


facturate peste 45 de lei

SELECT serviciu,subserviciu,totalplata FROM servicii WHERE totalplata>45