|
by: David Link |
last post by:
Hi,
Why does adding SUM and GROUP BY destroy performance?
details follow.
Thanks, David Link
s1.sql:
SELECT
t.tid, t.title,
COALESCE(s0c100r100.units, 0) as w0c100r100units,
|
by: U N Me |
last post by:
I have a continuous form that lists records from a query. One of the
columns is an amount field, In the footer of the form I place a text
box that displays the total (sum) of the amount.
The data in the form is linked from a one-to-many table relationship.
In this instance, I really can't sum the value from the one's table
since if there were 3 records in the many table for a record id, the
value would be summed 3 times. IOW, I may be...
|
by: Anne Heddal |
last post by:
In the first line I'm trying to count the the unqiue values of the ID
column, but I'm getting syntax error, any idea how to format the distinct
count?
SELECT Count(test.ID) AS IDCOUNT FROM (select distinct test.ID FROM test),
Sum(test.balance) AS BAL, test.statement, billing.YYMM
FROM billing INNER JOIN test ON billing.ID = test.ID
WHERE (((test.invoice) Like "X*") AND ((test.due)=0) AND
((test.collections)=0))
GROUP BY test.statement,...
|
by: |
last post by:
need some help with some sql I can't seem to get the syntax right. I've tried several but to no avail the one below gets me the
closest but I can't get the guardians records pulled.
SELECT SUM(tuition)
FROM child INNER JOIN guardian ON guardian.ID = child.child_ID
I would like the results to show the records from the guardian table as well
tables:
GUARDIAN
|
by: David |
last post by:
Hi,
I have an asp page which prints data as follows:
The sum in brackets is a calculated result on the page, SQ *
RS2("SelectorQty"), a variable SQ which holds a qty multiplied by a
record value
96 (50)
104 (50)
96 (100)
|
|
by: Rudolf Bargholz |
last post by:
Perhaps some kind soul could help me out with an SQL I have been trying all
day to get to work, where one colum is just not summing up the way I want it
to.
I have the following data
GRP_SEQ ITEM_SEQ NR_ITEMS PERSONS_SEQ
1 A 2 aa
1 A 2 bb
|
by: NeoGeo |
last post by:
I have a problem with a SQL SELECT query. As far as my research goes i figured out that UNIQUE is used when you have one column that you whant unique and DISTINCT is used when you have more than one column that you want to all be unique. But i have a query where i want just some of the columns to be unique and some not. Here is the full query (It's in a stored procedure):
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE...
|
by: Scott Price |
last post by:
Hello Gurus of the Access world...
This one has me stumped. I am developing a meal planning database for large functions (1000 people +- for up to 4 days). I have stored base recipes, as well as stored historic data from past years. To generate a shopping list report I am using this sql query:
SELECT tblIngredient.ItemName, Sum(tblRecipeIngredient.Quantity) AS TotQuantity, tblMeasureType.MeasureDesc, tblIngredient.RecipeMeasureID,...
|
by: AccessIdiot |
last post by:
I have three tables used in a query.
Table A: Has field with name of species.
Table B: Has the number of specimens caught per catch.
Table C: Has measurements of specimens.
I have generated the query in design view to get the min, max, and avg length of two particular species. The query should also report the number of specimens. For some reason I am not getting the right numbers.
For example, I know for a fact that there were 84...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|