Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
SELECT '',"Date", "In", "Out" FROM "Table1" ORDER BY "Date"
UNION
SELECT 'Total @',MAX("Date"), SUM( "In" ), SUM( "Out" ) FROM "Table1"
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
although this topic is tagged as solved i would like to add a small tip.
data fields are selected & displayed from "Table1".
the UNION clause is used in order to display the summed values of the fields "In" & "Out" on a single row.
therefore as Villeroy has pointed out all selected values within the UNION clause must use either an aggregate function or be included in a group clause.
replacing "Date" with 'NULL' in the UNION clause may in your case provide a more appropriate result.
SELECT '', "Date", "In", "Out" FROM "Table1" ORDER BY "Date"
UNION
SELECT 'Total' , null, SUM( "In" ), SUM( "Out" ) FROM "Table1"
open office 4.1.14 & LibreOffice 6.4.4.2 x64 using HSQL 1.8.0.10 (Embedded) and HSQL 2.6.0 (Split) on Windows 10