receipt definition for sql