How could a table be created from several queries in mysql
. I have the following questions:
--selecciona tipo gasto sin repetir un registro ---
SELECT DISTINCT tipo_gasto FROM factura'
number of records of that variable
SELECT COUNT(tipo_gasto) cantidad FROM factura WHERE tipo_gasto = 'vivienda'
Add the columns type_expend
SELECT ROUND(SUM(valor_base),2) total FROM factura WHERE tipo_gasto = 'VIV'
Is it possible to create a table based on these queries?