added SQL example and checked query, renamed rcost columns