Test logs sql