Changed the sql queries

* before, rivers that were below all selected return period
 have been discarded (not on purpose)
--> they are now returned with rp_class 0
Merge branch 'sql_query'