Export dev and SQL statement refined