Data analytics using SQL for matrix multiplication