I have a Oracle Apex function which is giving a sequence of rows in a date range. The items picked in the sequence are soming from a Identifier called TURNUS. For examle:
Date Range: 01-NOV-2016 to 30-NOV-2016
TURNUS is: 7
Return…
I am trying to extract a sum of modified history field limited by 100 and grouped by each account, but the query below extracts sum of all rows from CDR_Accounts with charged_quantity = 60 and does not limit to 100.
table1 = table2 and these are the…
Here is my issue. I would like to find duplicate 'code ifls' and get the different warehouses where I get this duplicated code
This is how the table looks like:
| code ifls | warehouse |
| 4013 | 1 |
| 4013 | 2 |
| …
In this query, I am attempting to get a count that gives me a count of patients for each practice under given conditions.
The issue is that I have to show patients who have had >=3 office visits in the past year.
Count(D.PID)
in the select list is…
I am not accustomed to using SQL for View Creation, It's forcing me to use HAVING and GROUP BY, in a standard SQL statement i would use WHERE but apparently that's not allowed. I want to SELECT DISTINCT on dbo.[ShowTex Belgie NV$Item].No_ only. But…
getting error:
1064 - You have an error in your SQL syntax;
check the manual that corresponds to your MySQL
server version for the right syntax to use near
't1.pard_suma LIMIT 0, 25' at line 5
NO DISTINCT error:
#1054 - Unknown column…
If I have the following table:
my_table:
varchar name
int score
and I want to do the following query:
select name from my_table group by name having count(*)>3
union
select name from my_table where name like '%xyz'
Is there a way…
Placing where after group by in LINQ to SQL, works like having in T-SQL. I hope that LINQ generates having statement in result. but when I look at the output statement, I don't see any having statement. Is there any method or trick to force LINQ to…
I was wondering if it's ok to use sql HAVING to find certain rows in a table.
Example:
I have a table with three columns -> ID (int, primary key), type and size (varchar)
One row looks like this:
ID type size
1 15; 16; 17 4;…
I am running SSMS 2008
select
A.JOBNUMBR as [Service Call], A.PONUMBER as [PO Number],
sum(A.QTYUNCMTBASE*A.UNITCOST) as [Committed Cost PO],
SUM(B.WS_Committed_Cost) as [Committed Cost WS],
…
I want to GROUP rows together based on a field, then SELECT only 1 of those fields from each group.
Say I have a ProductID which is a compound key key based on 4 fields {model, make, region, iteration}. The ProductID is always in the format…
i have trouble with mysql, i dont find the way to do it maybe i dont know the good mysql keyword
mysql5
+----------+------------+----------+
| ID | FOREIGNKEY | TRAINER |
+----------+------------+----------+
| ... | ... | ... …