Created Mode aggregate function
Dev sql scripts