Select - list here the fields you are looking at
Select a specific branch
WHERE item.homebranch=<<Home branch|branches>>
Where homebranch = 'MCC_B'
When searching for a multi-campus branch
where homebranch like 'mcc%'
Date range
WHERE date_due BETWEEN <<Start date|date>> AND <<End date|date>>
SQL aliases are used to give a table, or a column in a table, a temporary name especially when the table name.fieldname is quite long.
Group by branch and then itype
group by homebranch, itype
ORDER by homebranch, itype
For lost, missing, lost and paid values sort by when the value changed
ORDER BY i.itemlost_on, i.homebranch
Item call number in ascending order
ORDER BY i.cn_sort ASC
Date accessed from borrowers (create patron record created)
The SQL UNION clause/operator is used to combine the results of two or more SELECT statements without returning any duplicate rows.
UNION All however will allow duplicates
Link-allows you to enter a clickable link into the report
-- Show bib record by having a clickable link to bib record it can be edited if need be
CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=', biblionumber, '\">', biblionumber, '</a>' ) AS biblionumber,