PREFERRING clause of a database query in different SQL dialects which support preferences.show.query(p, dialect = "EXASOL", df = NULL)show.pref for details.PREFERRING-clause (in some rarely used dialects also SKYLINE OF).
For example consider a database table r(a,b). The preference selection psel(r, low(a) * high(b)) can be expressed by (in the Exasol dialect):SELECT * FROM r PREFERRING LOW a PLUS HIGH b
The show.query function generates just the PREFERRING-clause, i.e. show.query(low(a) * high(b)) returns
PREFERRING LOW a PLUS HIGH b
As usual in SQL queries, all keywords are not case sensitive, i.e., PLUS or plus does not make any difference.
S. Mandl, O. Kozachuk, M. Endres, W. Kiessling (2015): Preference Analytics in EXASolution. 16th Conference on Database Systems for Business, Technology, and Web.
show.query(low(a) * high(b))
show.query(low(a) * high(b), dialect = 'Preference SQL')Run the code above in your browser using DataLab