remove unused lib/attribute and write SQL queries on one line