Skip to main content
-1 votes
2 answers
45 views

Does order by in a window function add more frames?

Using : sum(Age) over(partition by Country) as Total Id FirstName LastName Age Country Total ----------- --------------- ---------- ----------- --------------- -...
jessejbweld's user avatar
0 votes
1 answer
104 views

SQL Group By and Order by with sum

I have this query: --10/24/24 - UNIT PRICE AND QTY SHIPPED SELECT DBO.SHIPPER.PACKLIST_ID, dbo.shipper.SHIPPED_DATE, DBO.SHIPPER.CUST_ORDER_ID, dbo.SHIPPER_LINE.SHIPPED_QTY, dbo....
Eric's user avatar
  • 921
1 vote
0 answers
30 views

How do I group results of a query in wordpress

I've got a custom post type for staff. The fields are first_name, last_name, job_title, telephone, email, and notes. All staff are categorized by location using WP core Category. I need to output the ...
banacan's user avatar
  • 63
0 votes
2 answers
47 views

Does using ORDER BY on an indexed column in a query cause issues if new rows are inserted during query execution

I have a table Users with id, this table has a million records or more. So when fetching data from the table I am using batching with offset & limit to reduce load on my server. My question is if ...
Manu S Rao's user avatar
0 votes
0 answers
18 views

ORA-01791: not a SELECTed expression on Order [duplicate]

When I put order by, I get an error that ORA-01791: not a SELECTed expression, and I've no idea what happen, could you please tell me what should I do? Select distinct FL.MEANING||' : '||FL.Tag||' : '|...
CanaConstance's user avatar
0 votes
1 answer
37 views

Having difficulty sorting Snowflake data that contains numeric and non-numeric data

I have a query in Snowflake where I am returning both numeric and varchar values and am struggling with getting the sort to work correctly. For context, this column is calculated by dividing two ...
BenTen's user avatar
  • 393
1 vote
3 answers
111 views

SQL query left join with sum,group by and order by in MS Access

I'm trying to execute a SQL query with a left join with sum, group by and order by clauses in MS Access. But the result is not correct - perhaps the SQL code I am using is wrong. Table Expense ID ...
dlaksmi's user avatar
  • 295
0 votes
3 answers
81 views

How to sort all numbers before letters with linguistic sorting?

In an Oracle SQL query which uses binary sorting rules, numbers are sorted before letters. But if the query uses a language specific collation to enable linguistic sorting, then numbers are sorted ...
cremor's user avatar
  • 6,845
1 vote
3 answers
72 views

How to sort numbers before letters with linguistic sorting?

In an Oracle SQL query which uses binary sorting rules, numbers are sorted before letters. But if the query uses a language specific collation to enable linguistic sorting, then numbers are sorted ...
cremor's user avatar
  • 6,845
1 vote
1 answer
40 views

Can I order by a conditional combination of fields in MySQL?

Example Fiddle CREATE TABLE Demo (JobID INT(11), Status VARCHAR(250), InvoiceStatus VARCHAR(250)); INSERT INTO Demo (JobID, Status, InvoiceStatus) VALUES (1, "Active", NULL), (2,...
Ben Holness's user avatar
  • 2,697
0 votes
1 answer
65 views

How select query from record count more than 1 and count more than 2 with custom column (Option) in MS Access

I'm trying to select query from record count more than 1 (ID&DATE&INOUT) and count more than 2 (ID&DATE) with custom column (Option) in MS Access so with "NO" in the option ...
dlaksmi's user avatar
  • 295
1 vote
1 answer
64 views

Why are Oracle and SQL Server producing different sort orders?

I've got a table with a column of BANK_ID alphanumeric (VARCHAR2 in Oracle, VARCHAR in SQL Server) length 12. There are three records with BANK_ID of BARCLAYS, BARCLAYS_LDN and BARC_FRA_EUR. In Oracle,...
AddicksAddict's user avatar
1 vote
2 answers
154 views

How select query from record count more than 2 with custom column (Option) in MS Access

I'm trying to select query from row count more than 2 based on ID and DATE and OPTION in MS Access. so with "NO" in the option column then the record more than 2 is not included in my sql ...
dlaksmi's user avatar
  • 295
1 vote
1 answer
67 views

How select query from record count more than 2 in MS Access

I'm trying to select query from row count more than 2 based on ID and DATE in MS Access. Please Guide me I want to keep it as a single query. Thanks Table Absen ID DATE TIME INOUT 5008 28-Apr-24 08:...
dlaksmi's user avatar
  • 295
0 votes
2 answers
39 views

SAS proc sql: select for each value the right interval

Suppose there is a list of clients and each client has different contracts that have a due date. For each client, I want to select the contract with the first following duedate after a given reference ...
Hanne DC's user avatar

15 30 50 per page
1
2 3 4 5
514