Ask Your Question

I need help with queries and functions in LibreOffice Base

asked 2015-03-18 15:06:02 +0200

mrmister gravatar image

updated 2015-03-18 15:06:49 +0200

Hello I'm starting with queries and functions. Right now I know how to tackle queries, but I don't know very well how may I use functions on queries. I would like to master all functions, so I need examples with functions. The problem is I don't know where may I find help with this? I'd like to see samples about these functions:

Average, Count, Maximum, Minimum, Sum, Every, Any, Some, STDDEV_POP, STDDEV_SAMP, VAR_SAMP, VAR_POP, Collect, Fusion, Intersection, Group

Sadly I don't have seen any documentation from LibreOffice explaining every function with a sample. Please, could someone give me some examples for these functions? I'd like to see them working and what everyone do. Cheers

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2015-03-18 17:16:20 +0200

doug gravatar image

Base uses HSQLDB 1.8 by default, so refer to documentation for that application and version. Here is one that came up in my search. Basically, you will create a column in a SQL query with the function, i.e., REPLACE( "field1", 'hello', 'world' ) where the internal "" could also be backquotes (``). Add an alias and execute, save the query, and invoke the query with the function as a recordsource.

edit flag offensive delete link more

answered 2015-03-18 23:14:09 +0200

mrmister gravatar image

Hi there, Well more than HSQLDB 1.8 documentation, what I was looking for are some .odb files with queries, showing some examples about these functions, so I could play with the queries and see how every function works. Could you give me please, some .odb files, with some queries, so I could see how these functions work? Cheers

edit flag offensive delete link more


This forum does not have a native function for trading .odb files. The list of functions in the question is the same as the drop-down list in the query builder window. To see how it works, just add a field above the selected function, and in a second column choose the function Group with another field. Thus, the query SELECT "Field1", COUNT( "Field1" ) FROM "Table1" GROUP BY "Field1" will count the number of instances of each value in Field1, with maybe special treatment of nulls.

doug gravatar imagedoug ( 2015-03-19 02:38:02 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-03-18 15:06:02 +0200

Seen: 928 times

Last updated: Mar 18 '15