CREATE OR REPLACE VIEW `view_logs_system` AS
SELECT 
	l.id_logs_stock AS "id",
	l.descricao AS descricao,
	CASE 
		WHEN 
			l.sucesso = 1 
		THEN
			"true"
		ELSE
			"false"
	END AS sucesso,
	CONCAT(u.nome," ", u.apelido) AS nome
FROM logs_sistema l
JOIN utilizadores u ON l.id_user_logs = u.id_user
ORDER BY l.id_logs_stock
LIMIT 100;