edit entity sql
edit tests (with stats)

@TODO