Uni assignment working with SQL