I am learning SQL currently and I have a question. I have two tables called "vehicul" and proprietate. The first table (vehicul) looks like this:
id nr_vehicul marca id_marca tip culoare capacitate_cilindrica
1 DJ-01-AAA Mercedes 1 CLK 350 negru 3500
2 DJ-01-BBB Mercedes 1 S 500 silver 5000
3 DJ-01-CCC Mercedes 1 ML 550 alb 5500
4 DJ-01-DDD BMW 2 325 galben 2500
5 DJ-01-EEE BMW 2 X5 negru 350
And the second table (proprietate) looks like this:
id serie_buletin cnp nr_vehicul data_cumpararii pret
1 AK162332 2006036035087 DJ03AAA 2014-05-01 35000
2 AK162332 2006036035087 DJ03BBB 2014-05-02 90000
3 AK176233 6548751520125 DJ03CCC 2014-05-03 55000
4 BZ257743 6548751520125 DJ03DDD 2014-05-04 25000
5 BZ257743 2006036035087 DJ03EEE 2014-05-05 63000
I want to display the column "marca" from the first table and the column "price" from the second, but like this.
marca | pret
Mercedes | 180000
BMW | 88000
Basically I have three Mercedes cars and two BMW cars, how can I display Mercedes one time and the prices of those three summed up?