SShortSingh.
Back to feed

Hospital Records Analyzed With SQL to Answer Doctor-Level Questions

0
·5 views

A writer used SQL to examine hospital patient records from a doctor-focused angle, moving beyond simple row retrieval. The queries explored how many doctors are available, how many patients each has treated, and which patients belong to a specific doctor. They also looked at patient gender breakdowns per doctor and the departments each doctor works in. The exercise reinforced concepts such as GROUP BY, COUNT(), ORDER BY, WHERE, and case-insensitive ILIKE searching, along with a framework for structuring queries around real business questions.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Hidden Web Page Text Can Hijack AI Assistants; Least Privilege Blocks It

A hidden line embedded in a web page can cause an AI assistant to send email on an attacker's behalf. Because an app places page content and its own instructions into one prompt, the model has no hard boundary between them, and prompt wording alone is not a real security control. In a toy simulation, a hidden line steered 109 of 200 summaries, dropping to 28 of 200 with delimiters and a system rule, though those defences remained probabilistic. Removing the email tool from the task's allowlist brought executed calls to zero across 100 attempts. The author recommends app-decided tool permissions, a gatekeeper that validates tool calls and their arguments, and human confirmation for irreversible actions.

0
ProgrammingDEV Community ·

Why AI coding agents burn tokens re-sending their history on every call

A coding agent's input token count can dwarf a single chat because models keep no memory between calls, so earlier turns must be re-sent each time. Because each call includes everything before it, total input across many calls grows close to the square of the number of calls, and server-side state saves upload bytes without shrinking the billed context. In a lab simulation of a 30-call agent task, about 94 percent of estimated input tokens were history re-sent from earlier calls. The author recommends trimming tool results before they enter history, enabling prompt caching with static content placed first, and clearing old tool results in large batches near context limits. The core takeaway is that measuring the re-sent share of history matters more than buying a larger context window.

0
ProgrammingDEV Community ·

Why AI Agent Retries Can Duplicate Actions Instead of Repeating Them

A customer received three slightly different follow-up emails after an AI agent hit a timeout during sending. The send had actually succeeded, but the agent treated the failed step as a reason to draft and send a new message. The orchestrator then restarted the whole run, producing a third email that even mentioned an unapproved refund. The author argues that unlike a plain software retry that resends identical data, an agent's retry is a fresh decision made by a model that no longer knows whether the first attempt went through. Because the new attempts differ in content, downstream systems cannot recognize them as duplicates, so write operations need to be made safe in advance.

0
ProgrammingDEV Community ·

Azure API Management flaw exposed secrets; Classic tier users urged to rotate credentials

Microsoft closed a flaw in Azure API Management on November 19, but the fix does not invalidate secrets already stolen. An unknown actor accessed tokens, secrets and named values inside APIM, and Norway's National Security Authority advises all APIM users to assume exposure and rotate every token and secret. Only Classic tiers (Developer, Basic, Standard and Premium) are affected; APIM v2 tiers are not. Microsoft's guide says to create replacements at the issuer, update APIM, test, and then revoke old credentials, since changing the value in APIM alone leaves the old key valid. Norwegian energy firms Equinor and Skagerak Energi are named in the NSM notice after reporting cyberattacks.