# \#sql

**URL:** https://forum.innovativeusers.org/tag/sql/25.md

[Latest](https://forum.innovativeusers.org/latest.md) · [Categories](https://forum.innovativeusers.org/categories.md) · [Tags](https://forum.innovativeusers.org/tags.md)

---

## [Daily Patron Library Card Number Changes](https://forum.innovativeusers.org/t/daily-patron-library-card-number-changes/3077)

<div class="topic-metadata">

**Author:** [@Phil\_Agnew](https://forum.innovativeusers.org/u/Phil_Agnew)\
**Replies:** 1\
**Last updated:** [October 27, 2026, 7:58pm UTC](https://forum.innovativeusers.org/t/daily-patron-library-card-number-changes/3077 "2026-10-27T19:58:46Z")

</div>

Greetings! For anyone fortunate enough not to know this already, Polaris doesn’t store patron library card number changes in any meaningful way, except when you use the Merge function on the Patron Registration. There a…

---

## [Net Holds Made Available (Library Level Grouping)](https://forum.innovativeusers.org/t/net-holds-made-available-library-level-grouping/3062)

<div class="topic-metadata">

**Author:** [@Phil\_Agnew](https://forum.innovativeusers.org/u/Phil_Agnew)\
**Replies:** 0\
**Last updated:** [October 6, 2026, 6:46pm UTC](https://forum.innovativeusers.org/t/net-holds-made-available-library-level-grouping/3062 "2026-10-06T18:46:49Z")

</div>

This is just a quick post of something I made this morning while trying to confirm hold fulfillment trends between our member Libraries. The output doesn’t look all that special, but I find the question of “How many item…

---

## [Monthly Holds Circulation Percentages](https://forum.innovativeusers.org/t/monthly-holds-circulation-percentages/3039)

<div class="topic-metadata">

**Author:** [@Phil\_Agnew](https://forum.innovativeusers.org/u/Phil_Agnew)\
**Replies:** 0\
**Last updated:** [September 11, 2026, 4:44pm UTC](https://forum.innovativeusers.org/t/monthly-holds-circulation-percentages/3039 "2026-09-11T16:44:47Z")

</div>

There are some more robust solutions already for detailing holds checkouts vs. direct/browsing checkouts, but I put together a little something that just gives you some flat counts and percentages for the last full month…

---

## [SQL Query - Bibs with 12 or more circulating items](https://forum.innovativeusers.org/t/sql-query-bibs-with-12-or-more-circulating-items/3038)

<div class="topic-metadata">

**Author:** [@AnnieW](https://forum.innovativeusers.org/u/AnnieW)\
**Replies:** 3\
**Last updated:** [September 11, 2026, 2:42pm UTC](https://forum.innovativeusers.org/t/sql-query-bibs-with-12-or-more-circulating-items/3038 "2026-09-11T14:42:27Z")

</div>

Hello all. I was wondering if someone could help me with a SQL query for Sierra. I need a list of bibs with 12 or more circulating items. I’m looking for adult age-level bibs, and need to filter out bibs with locations e…

---

## [Hoopla ID mismatches: Find where 037$a and ID in hoopla URLs don't match](https://forum.innovativeusers.org/t/hoopla-id-mismatches-find-where-037-a-and-id-in-hoopla-urls-dont-match/2656)

<div class="topic-metadata">

**Author:** [@crosenthal](https://forum.innovativeusers.org/u/crosenthal)\
**Replies:** 2\
**Last updated:** [August 20, 2026, 10:00pm UTC](https://forum.innovativeusers.org/t/hoopla-id-mismatches-find-where-037-a-and-id-in-hoopla-urls-dont-match/2656 "2026-08-20T22:00:37Z")

</div>

This query find bibs where the 037$a tag does not match the hoopla id in the 856 tag URL. An incorrect 037 can cause hoopla titles to be unable to be checked out in Vega. SELECT DISTINCT BT.BibliographicRecordID AS reco…

---

## [Reports to Help Find Items by Lexile and AR Scores](https://forum.innovativeusers.org/t/reports-to-help-find-items-by-lexile-and-ar-scores/2948)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 1\
**Last updated:** [August 10, 2026, 4:04pm UTC](https://forum.innovativeusers.org/t/reports-to-help-find-items-by-lexile-and-ar-scores/2948 "2026-08-10T16:04:24Z")

</div>

I caught a ticket from one of the libraries I work with and they asked for a way to find items by Lexile and/or AR scores, specifically items that were currently checked in. I couldn’t find a great way to do this in Leap…

---

## [MARC Multi-Tag Search](https://forum.innovativeusers.org/t/marc-multi-tag-search/3014)

<div class="topic-metadata">

**Author:** [@Phil\_Agnew](https://forum.innovativeusers.org/u/Phil_Agnew)\
**Replies:** 0\
**Last updated:** [August 6, 2026, 7:49pm UTC](https://forum.innovativeusers.org/t/marc-multi-tag-search/3014 "2026-08-06T19:49:21Z")

</div>

I find if occasionally useful to search MARC data directly, but since there doesn’t appear to be any way to do that directly in Leap, I’ve resorted to SQL for these purposes. I imagine I’ll continue tweaking this as time…

---

## [Top titles by material type sql issue](https://forum.innovativeusers.org/t/top-titles-by-material-type-sql-issue/2970)

<div class="topic-metadata">

**Author:** [@lmurff](https://forum.innovativeusers.org/u/lmurff)\
**Replies:** 4\
**Last updated:** [June 25, 2026, 4:52pm UTC](https://forum.innovativeusers.org/t/top-titles-by-material-type-sql-issue/2970 "2026-06-25T16:52:59Z")

</div>

So I cribbed this SQL to find top titles and does appear to be working but I can not figure out why the reports circ count doesn’t always match Polaris. Could it be unique patrons or no renewals? If anyone has suggests…

---

## [SQL Query Batch for Analysis of Checkouts by Branch](https://forum.innovativeusers.org/t/sql-query-batch-for-analysis-of-checkouts-by-branch/2530)

<div class="topic-metadata">

**Author:** [@bgaydos](https://forum.innovativeusers.org/u/bgaydos)\
**Replies:** 9\
**Last updated:** [June 7, 2026, 2:10pm UTC](https://forum.innovativeusers.org/t/sql-query-batch-for-analysis-of-checkouts-by-branch/2530 "2026-06-07T14:10:48Z")

</div>

Collection Health Holds.sql (54.7 KB) (latest version uploaded 2/22/2026) This “Collection Health Holds Query” has been in development for over two years now. I first mentioned it in this post and presented a snippet…

---

## [Understanding PARTITION BY in SQL Server and PostgreSQL](https://forum.innovativeusers.org/t/understanding-partition-by-in-sql-server-and-postgresql/2962)

<div class="topic-metadata">

**Author:** [@bgaydos](https://forum.innovativeusers.org/u/bgaydos)\
**Replies:** 0\
**Last updated:** [June 7, 2026, 5:37am UTC](https://forum.innovativeusers.org/t/understanding-partition-by-in-sql-server-and-postgresql/2962 "2026-06-07T05:37:51Z")

</div>

In my SQL presentations at the last couple of IUG conferences, I really wanted to cover window functions but there was never enough time. A recent post on SQLServerCentral offers a very accessible introduction to the s…

---

## [The Great ILS-Data Pre-Conference: Quick Lessons With Your Peers](https://forum.innovativeusers.org/t/the-great-ils-data-pre-conference-quick-lessons-with-your-peers/2897)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 2\
**Last updated:** [May 20, 2026, 5:17pm UTC](https://forum.innovativeusers.org/t/the-great-ils-data-pre-conference-quick-lessons-with-your-peers/2897 "2026-05-20T17:17:47Z")

</div>

Program Title: The Great ILS-Data Pre-Conference: Quick Lessons With Your Peers Track: General Program Description: Ease your way into this year’s conference with our all-star assortment of IUG experts who will present…

---

## [SQL Basics for Polaris: Querying Data with the Polaris Find Tool](https://forum.innovativeusers.org/t/sql-basics-for-polaris-querying-data-with-the-polaris-find-tool/2896)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 1\
**Last updated:** [April 24, 2026, 3:04pm UTC](https://forum.innovativeusers.org/t/sql-basics-for-polaris-querying-data-with-the-polaris-find-tool/2896 "2026-04-24T15:04:38Z")

</div>

Program Title: SQL Basics for Polaris: Querying Data with the Polaris Find Tool Track: Polaris Program Description: This hands-on workshop introduces SQL concepts specifically tailored to the Leap/Polaris Find Tool, he…

---

## [Slightly More Advanced Polaris SQL: The Sequel to Absolute Beginner’s SQL](https://forum.innovativeusers.org/t/slightly-more-advanced-polaris-sql-the-sequel-to-absolute-beginner-s-sql/2910)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 0\
**Last updated:** [April 23, 2026, 4:27pm UTC](https://forum.innovativeusers.org/t/slightly-more-advanced-polaris-sql-the-sequel-to-absolute-beginner-s-sql/2910 "2026-04-23T16:27:43Z")

</div>

Program Title: Slightly More Advanced Polaris SQL: The Sequel to Absolute Beginner’s SQL Track: Polaris Program Description: The direct sequel to Polaris SQL for the Absolute Beginner (IUG 2023) , this presentation bui…

---

## [Vibe Coding with SQL for Fun and "Profit"](https://forum.innovativeusers.org/t/vibe-coding-with-sql-for-fun-and-profit/2898)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 0\
**Last updated:** [April 23, 2026, 11:55am UTC](https://forum.innovativeusers.org/t/vibe-coding-with-sql-for-fun-and-profit/2898 "2026-04-23T11:55:14Z")

</div>

Program Title: Vibe Coding with SQL for Fun and “Profit” Track: General Program Description: This session will explore ways to use modern LLM (AI) chat systems to create and check your SQL code. Although the examples i…

---

## [Round Prices to Stop Taking Money at Front Desk](https://forum.innovativeusers.org/t/round-prices-to-stop-taking-money-at-front-desk/2401)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 12\
**Last updated:** [February 3, 2026, 7:00pm UTC](https://forum.innovativeusers.org/t/round-prices-to-stop-taking-money-at-front-desk/2401 "2026-02-03T19:00:41Z")

</div>

This query will update item prices, rounding them to the nearest five cents. We’ve used this in a library that moved away from money and payment transactions at the desk, and they instead have patrons pay everything at s…

---

## [Browse vs Holds Circulation](https://forum.innovativeusers.org/t/browse-vs-holds-circulation/1390)

<div class="topic-metadata">

**Author:** [@mfields](https://forum.innovativeusers.org/u/mfields)\
**Replies:** 4\
**Last updated:** [January 9, 2026, 8:49pm UTC](https://forum.innovativeusers.org/t/browse-vs-holds-circulation/1390 "2026-01-09T20:49:55Z")

</div>

Browse vs Holds Circulation Browse vs Holds Circulation.rdl (81.7 KB) Displays the number of browse and hold first time checkouts for a specified library’s branches between two dates. Results can be grouped by either c…

---

## [Minuteman Script Repository](https://forum.innovativeusers.org/t/minuteman-script-repository/2769)

<div class="topic-metadata">

**Author:** [@jmgold](https://forum.innovativeusers.org/u/jmgold)\
**Replies:** 0\
**Last updated:** [December 31, 2025, 7:43pm UTC](https://forum.innovativeusers.org/t/minuteman-script-repository/2769 "2025-12-31T19:43:33Z")

</div>

This is an ongoing project, but we are working to update (and properly comment) all of the various automated Python scripts Minuteman is currently using for various tasks, and to keep them current with Github. The repos…

---

## [Bulk waive SQL query for 7.8 help](https://forum.innovativeusers.org/t/bulk-waive-sql-query-for-7-8-help/2753)

<div class="topic-metadata">

**Author:** [@vmoss](https://forum.innovativeusers.org/u/vmoss)\
**Replies:** 10\
**Last updated:** [December 18, 2025, 8:41pm UTC](https://forum.innovativeusers.org/t/bulk-waive-sql-query-for-7-8-help/2753 "2025-12-18T20:41:21Z")

</div>

Hi, We are upgrading to 7.8 during Christmas week because our director has decided she wants to waive all fines older than X and below Y by the end of the year. We have it updated on the training server, and I found wh…

---

## [Who Modified a Patron Registration](https://forum.innovativeusers.org/t/who-modified-a-patron-registration/2403)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 1\
**Last updated:** [November 3, 2025, 6:27pm UTC](https://forum.innovativeusers.org/t/who-modified-a-patron-registration/2403 "2025-11-03T18:27:07Z")

</div>

Keeping in mind that you really can’t see what modifications were made to a patron registration, you can at least see who made the modification. SELECT th.TransactionID, th.TranClientDate AS \[Date\], o.Name A…

---

## [SQL EXISTS Use Cases and Examples](https://forum.innovativeusers.org/t/sql-exists-use-cases-and-examples/2675)

<div class="topic-metadata">

**Author:** [@bgaydos](https://forum.innovativeusers.org/u/bgaydos)\
**Replies:** 0\
**Last updated:** [October 23, 2025, 2:02am UTC](https://forum.innovativeusers.org/t/sql-exists-use-cases-and-examples/2675 "2025-10-23T02:02:38Z")

</div>

This SQL tutorial will explain what the keyword EXISTS does and show several different use cases.

---

## [You Saved Amounts - Minus Renewals](https://forum.innovativeusers.org/t/you-saved-amounts-minus-renewals/1742)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 2\
**Last updated:** [October 16, 2025, 2:58pm UTC](https://forum.innovativeusers.org/t/you-saved-amounts-minus-renewals/1742 "2025-10-16T14:58:22Z")

</div>

– NOTICE – NOTICE – NOTICE – Please check the comments for updates to this query, especially the one that updates the logic to account for checking out multiple items under the same bibliographic record. This query pul…

---

## [SQL to identify bibs with no 520 but matching other bibs with 245ab](https://forum.innovativeusers.org/t/sql-to-identify-bibs-with-no-520-but-matching-other-bibs-with-245ab/2655)

<div class="topic-metadata">

**Author:** [@ewright](https://forum.innovativeusers.org/u/ewright)\
**Replies:** 0\
**Last updated:** [October 3, 2025, 7:04pm UTC](https://forum.innovativeusers.org/t/sql-to-identify-bibs-with-no-520-but-matching-other-bibs-with-245ab/2655 "2025-10-03T19:04:44Z")

</div>

Hello, I have used Create Lists to identify bibs with a specific cat date and no 520, and then imported the titles back into Sierra to find other bibs with the same 245ab. This takes so many steps! I wonder if anyone h…

---

## [Create Lists Cleanup Accountability](https://forum.innovativeusers.org/t/create-lists-cleanup-accountability/2642)

<div class="topic-metadata">

**Author:** [@bgaydos](https://forum.innovativeusers.org/u/bgaydos)\
**Replies:** 1\
**Last updated:** [September 29, 2025, 9:53am UTC](https://forum.innovativeusers.org/t/create-lists-cleanup-accountability/2642 "2025-09-29T09:53:37Z")

</div>

Create Lists Cleanup Accountability.sql (1.6 KB) I noticed a bunch of review files in Create LIsts dating to 2024 and figured it was high time to send out some email to staff to take a good look at their review files an…

---

## [5-Way Sierra User Permissions Comparison Query](https://forum.innovativeusers.org/t/5-way-sierra-user-permissions-comparison-query/2635)

<div class="topic-metadata">

**Author:** [@bgaydos](https://forum.innovativeusers.org/u/bgaydos)\
**Replies:** 0\
**Last updated:** [September 24, 2025, 4:20pm UTC](https://forum.innovativeusers.org/t/5-way-sierra-user-permissions-comparison-query/2635 "2025-09-24T16:20:16Z")

</div>

5-WayUserPermissionsComparison.sql (1.7 KB) Run this SQL query to find differences in permissions between 5 different Sierra logins. One login name is specified in each of the LEFT OUTER JOINs. If you jneed to com…

---

## [How to create your custom GPT SQL Expert](https://forum.innovativeusers.org/t/how-to-create-your-custom-gpt-sql-expert/2581)

<div class="topic-metadata">

**Author:** [@bgaydos](https://forum.innovativeusers.org/u/bgaydos)\
**Replies:** 1\
**Last updated:** [August 15, 2025, 1:28pm UTC](https://forum.innovativeusers.org/t/how-to-create-your-custom-gpt-sql-expert/2581 "2025-08-15T13:28:44Z")

</div>

If you opened this post, you have probably seen some of Wes Osborn’s posts of Polaris SQL written with the aid of ChatGPT. Now personally, I have no plans to use AI to write any code due to my Luddite leanings, but reco…

---

## [Patrons With Outstanding Charges for Deleted Items](https://forum.innovativeusers.org/t/patrons-with-outstanding-charges-for-deleted-items/2551)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 2\
**Last updated:** [August 19, 2025, 6:08pm UTC](https://forum.innovativeusers.org/t/patrons-with-outstanding-charges-for-deleted-items/2551 "2025-08-19T18:08:34Z")

</div>

This query pulls patrons with existing charges on their accounts for deleted items. The fee reason is provided in the query so you can see what the charge was for. (Overdues, replacement, damage, etc) Additionally, we’re…

---

## [Circ Counts for All Items in a Record Set](https://forum.innovativeusers.org/t/circ-counts-for-all-items-in-a-record-set/2555)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 0\
**Last updated:** [July 24, 2025, 11:21am UTC](https://forum.innovativeusers.org/t/circ-counts-for-all-items-in-a-record-set/2555 "2025-07-24T11:21:42Z")

</div>

This is a reworking of the Circ Stats by Items in a Record Set, crafted by Trevor Diamond (MAIN). Rather than pulling total circ stats for the whole of the record set,this query returns circ counts for every item in the …

---

## [ILL Item History by PatronID](https://forum.innovativeusers.org/t/ill-item-history-by-patronid/2550)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 0\
**Last updated:** [July 18, 2025, 1:23pm UTC](https://forum.innovativeusers.org/t/ill-item-history-by-patronid/2550 "2025-07-18T13:23:58Z")

</div>

This query pulls the item level history for interlibrary loans (ILL) in Polaris. It’s important to remember that there are probably a dozen ways to handle ILLs that do or do not involve the Polaris ILL module or that par…

---

## [Hold Counts - Patron Branch vs Pickup Branch](https://forum.innovativeusers.org/t/hold-counts-patron-branch-vs-pickup-branch/1741)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 1\
**Last updated:** [March 17, 2024, 5:16pm UTC](https://forum.innovativeusers.org/t/hold-counts-patron-branch-vs-pickup-branch/1741 "2024-03-17T17:16:34Z")

</div>

This query pulls counts of holds placed at branches by patrons assigned to that branch and by patrons assigned to other branches. Useful for finding out how many patrons from other branches are using a given branch as a …

---

## [Deleted Items Billed and Overdue](https://forum.innovativeusers.org/t/deleted-items-billed-and-overdue/2513)

<div class="topic-metadata">

**Author:** [@CyberpunkLibrarian](https://forum.innovativeusers.org/u/CyberpunkLibrarian)\
**Replies:** 5\
**Last updated:** [June 27, 2025, 6:22pm UTC](https://forum.innovativeusers.org/t/deleted-items-billed-and-overdue/2513 "2025-06-27T18:22:28Z")

</div>

This query looks for overdue and replacement charges on patron accounts that are tied to items that have been deleted and removed from the system. SELECT pr.PatronFullName AS \[Patron Name\], p.Barcode AS \[Patron Barcod…

[Next page](https://forum.innovativeusers.org/tag/sql/25.md?match_all_tags=true&page=1&tags%5B%5D=sql)
