0
嗨我想查詢我的表中不同的地方。如何使用獨特的黑斑羚
這是我的查詢。
select distinct city,locality, avg_sqft from real_estate.re_search where city = 'bangalore' AND locality != 'jayanagar';
結果
+-----------+--------------+----------+
| city | locality | avg_sqft |
+-----------+--------------+----------+
| bangalore | bannerghatta | 13500 |
| bangalore | kormangala | 18000 |
| bangalore | kodipur | 7000 |
| bangalore | kormangala | 16000 |
| bangalore | horamavu | 9000 |
| bangalore | bellandur | 15500 |
| bangalore | kodipur | 9000 |
| bangalore | madivala | 12000 |
| bangalore | varthur | 12000 |
| bangalore | kormangala | 13500 |
| bangalore | bellandur | 13000 |
| bangalore | kodipur | 11500 |
| bangalore | kormangala | 14000 |
問題是我需要顯示在result.any幫助不同地區將不勝感激。
我不知道商業用途但是相同的位置在不同的行中具有不同的平方英尺值。如果可以對這些值進行求和,您可以通過下面的方法實現不同的地點。從城市,地點選擇城市,地點,總和(avg_sqft)from real_estate.re_search where city ='bangalore'AND locality!='jayanagar'group; – BigData