Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
50 views

I have an Access database that is tracking trucks. I have one table for trucks and all their details, and another table tracking the drivers and their details. The third table is tracking positions ...
RIOverAI's user avatar
-3 votes
0 answers
51 views

I'm working on Oracle 19 and I need to sort a 70GB table. I have unlimited parallelism. What would be the optimal values to optimize this sort? in terms of parallelism in terms of database ...
eliatou's user avatar
  • 736
Best practices
0 votes
3 replies
50 views

What is feedback on the normalisation of my ER diagram which I designed for my school project for a service to match users based on their preferences? The ERD is supposed to show no transitive ...
1million_ naira's user avatar
-3 votes
0 answers
71 views

I have a dev database with dtu model under s3 tier and uat db with dtu model under s7 tier in Azure SQL databases. The issue is: I have a stored procedure which runs differently in dev and uat. It's ...
Kotha Hemanth's user avatar
-4 votes
0 answers
46 views

Query latency differs across environments (Dev vs UAT) – same stored procedure, different performance. I'm facing a performance issue where the same stored procedure and identical query logic behave ...
Kotha Hemanth's user avatar
-5 votes
0 answers
66 views

For example: ALTER TABLE tbl_student ADD student_email VARCHAR(20); ALTER TABLE tbl_student DROP COLUMN student_email; Why add column, doesn't require the word COLUMN but drop requires it?
-1 votes
0 answers
66 views

I've aggregated multiple values of Item field using the XMLAGG function, as it was exceeding the 4000 char limit. But in the result set it is adding a new line in the first row then aggregates data in ...
Faiqa Saeed's user avatar
-4 votes
0 answers
83 views

I have a table: CREATE TABLE items ( item_date DATE, item VARCHAR(50), price DECIMAL(10,2) ); INSERT INTO items (item_date, item, price) VALUES ('2020-01-01', 'APPLE', 1.50); INSERT INTO ...
stats_noob's user avatar
  • 6,889
1 vote
1 answer
129 views

In Access 2016, I have 3 related tables: Series tblSeasons tblEpisodes Trying to write SQL to get a list of Series with a number of conditions. I have found that the following works perfectly fine. ...
user3173098's user avatar
0 votes
3 answers
133 views

I have a large MySQL table in phpMyAdmin, and I want to clear all data in a specific column. I know how to do it using: UPDATE table_name SET column_name = NULL; Or by dropping and re-adding the ...
ADIL RADIDI's user avatar
Advice
0 votes
2 replies
28 views

I am working on a C-UDF for Postgres, where i would like to somehow read from a passed Typed-Tuplestore in parallel. Either pthreads or worker-processes is fine, as long as the access isn't combined ...
Clebo Sevic's user avatar
-3 votes
2 answers
118 views

I have 2 tables Table1: ID rule_id_1 rule_id_2 1 12345 67889 2 54321 12345 Table2: rule_id rule_name 12345 Error Detected 54321 Job Completed Goal is to have a table like this: ID rule_id_1 ...
Abel's user avatar
  • 13
0 votes
0 answers
40 views

While using the aggregation functions in Apache IoTDB (version 2.0.5, tree model), I noticed that the result of the SUM function does not match the expected value, showing a noticeable floating-point ...
Cecilia Wong's user avatar
3 votes
0 answers
140 views

I have next PostrgreSQL query: SELECT * FROM person WHERE birth_date between ? and ? and gender = ? and ST_DWithin(location, ST_MakePoint(?, ?), 20000) and activity_date <= ? and id < ? ...
sankranti's user avatar
0 votes
1 answer
89 views

I am having some trouble with a CASE expression inside a JOIN. Essentially, what I would like to do, is whenever a FormLookupId = 31 I want to join on any record with the a specific string in the rl....
Unconquered82's user avatar
2 votes
3 answers
88 views

I've got this situation in which I need to copy and split account information: -- old create table old_account ( id bigserial not null primary key, uid varchar(32) -- , etc. ); insert into ...
Code4R7's user avatar
  • 3,196
-4 votes
0 answers
49 views

I need to flatten the JSON below in a way that will follow the logic: 1 actions can be repeated 1 personId repeated however per 1 personId will go unique feeType or correspondenceValue. also, ...
Xamiran Akiranbo's user avatar
-3 votes
1 answer
97 views

I have this table here as example: Group Where Bill Amount A from telephone -300 A from internet -200 A to electricity 500 B from water -1000 B to cable 500 B to gas 500 When you query Group A. The ...
Melz's user avatar
  • 9
Tooling
0 votes
6 replies
85 views

I am in the process of becoming a data analyst and I am having a hard time understanding when to use SQL and when to use R. I have tried re-watching videos of my data analyst course, but I am still ...
Dacian Joel Alvarez's user avatar
1 vote
1 answer
92 views

can you tell me why i get Character Set Mismatch in the first insert even if "in theory" they are equivalent? Oracle version: 19 SD.ValueText is NVARCHAR2 SELECT value FROM ...
thefiery77's user avatar
-6 votes
0 answers
79 views

CREATE TABLE IF NOT EXISTS abcatedt ( abe_name char(30) NOT NULL , abe_edit char(254) , abe_type smallint , abe_cntr integer , abe_seqn smallint NOT NULL , abe_flag integer ...
Igor's user avatar
  • 6,492
-3 votes
1 answer
66 views

I have a table with a list of claims for members that have specific service date ranges. The other table has a table of COE descriptions. The COE changes for some members and is indicated by the ...
Isabel's user avatar
  • 5
Advice
1 vote
9 replies
65 views

In SQL, if I omit the ORDER BY clause from a window function's OVER() clause, will it use the parent statement's ORDER BY instead? For example, are these two queries equivalent? -- Query 1: ORDER BY ...
Dan's user avatar
  • 5,080
0 votes
0 answers
57 views

There is a LONGBLOB-type field in a table that actually stores JSON-formatted data (as shown below). Column Name Data Type user_id INT id INT harbour_name VARCHAR name VARCHAR type VARCHAR properties ...
Cong Li's user avatar
0 votes
2 answers
73 views

I have a query of the form: SELECT T1.id, otherT1Column, someT2Column FROM T1 JOIN T2 ON T1.externalId = T2.id WHERE <some conditions> (which is constructed programmatically with JDBC, not ...
Alex Fotland's user avatar
-2 votes
0 answers
35 views

I am creating a temp table in a stored procedure to hold the results of a CTE query. Without the temp table the query works fine. The code is below. I keep getting an error at the INSERT INTO line - ...
tom's user avatar
  • 1
0 votes
1 answer
79 views

As I understand it, there are 4 different options when using FOR XML in a SQL query: RAW, AUTO, EXPLICIT, and PATH. I think for my example below, I want to largely use PATH, but I end up getting ...
Icron's user avatar
  • 31
0 votes
1 answer
176 views

I have a requirement to generate unique incrementing serial numbers by product type from a VB.NET application using SQL Server Express. I have created a table and also have a VB form where I am ...
MBinz's user avatar
  • 1
1 vote
0 answers
84 views

Our project uses the PostgreSQL database, managed via EclipseLink. Horizontal scaling is planned by migrating to the sharded Postgres Pro Shardman. Currently, the primary key of each table is a unique ...
denisnumb's user avatar
-6 votes
0 answers
79 views

SQL> MERGE INTO abcatedt t USING (SELECT '###-##-####' AS abe_name, 1 AS abe_seqn FROM DUAL) s ON( t.col1 = s.col1 AND s.col2 = t.col2 ) WHEN NOT MATCHED THEN INSERT INTO abcatedt ...
Igor's user avatar
  • 6,492
0 votes
0 answers
52 views

I’m working with ODPS / MaxCompute SQL on a data pipeline where I need to populate a missing identifier (biz_order_id) in a main table by joining to a reference table. Context The main table contains ...
Kevin's user avatar
  • 17
0 votes
1 answer
53 views

My Flask application exposes a REST API for CVE data stored in SQLite. The API supports filtering and pagination, but is my totalRecords count logic correct when filters are applied? totalRecords ...
Gug's user avatar
  • 1
0 votes
0 answers
39 views

I'm using Apache IoTDB 2.0.5 with tree model to process time series data, and I need to calculate the rate of change between each data point and its 10th previous point (i.e., (current value - 10th ...
Aibee Tang's user avatar
-1 votes
4 answers
151 views

I have a data table with a column A. I need to filter rows where the value in column A is greater than or equal to the overall average of column A. However, when two or more consecutive rows meet this ...
Allan's user avatar
  • 21
Best practices
0 votes
4 replies
38 views

I am designing a database schema in PostgreSQL for a notification system. I have several distinct "parent" entities that can trigger a notification log: order invoice shipment ...
Darryl Soh Soon Yong's user avatar
0 votes
1 answer
42 views

I am using Apache IoTDB 2.0.5 in the tree model and want to count the number of false states in a sequence using the count function, but the returned results have errors. The raw data is as follows: ...
花栖花栖's user avatar
0 votes
1 answer
131 views

I'm using NodeJS and node-adodb to try to run an update on a MS Access database that includes selects. I tried this: update [Objects] set [Object] = 1, [CardID] = (select id from Oracle where ...
raphael75's user avatar
  • 3,292
4 votes
1 answer
119 views

Let's say I have a simple Oracle view with an ORDER BY clause inside it. create or replace view MY_VIEW as select * from MY_BOOKS order by TITLE; Let's say I run a simple query select * from ...
Leszek Pachura's user avatar
2 votes
3 answers
159 views

I want to add to my result rows the immediate previous and following row according to a specific clause. Simplified case: ROWID value x level 0 1.0 0 1 1 2.0 1 2 2 3.0 2 1 3 4.0 3 2 4 5.0 4 1 5 6.0 5 ...
bux's user avatar
  • 7,731
-3 votes
2 answers
105 views

Employee name lang Nick C# Nick SQL Eva Rust Vi SQL Iv Java Need to select employees who know SQLr + something else i.e. Nick C# Nick SQL My attempts are: 1. select e.name from ( select name ...
J.J. Beam's user avatar
  • 3,233
Best practices
0 votes
15 replies
120 views

I have a T-SQL query shown here which is taking forever to run. I am trying to see if there is a better way to write the Inner Join statement. The source table has a millions of rows. Is there any ...
Java's user avatar
  • 1,334
1 vote
2 answers
150 views

I have multiple functions to convert column values into an array CREATE FUNCTION FN_ToArray ( @separator NVARCHAR(10) = '|' ) RETURNS NVARCHAR(500) AS BEGIN DECLARE @return VARCHAR(500) SET ...
Pyrus's user avatar
  • 117
3 votes
2 answers
84 views

From this data, sorted on num, |num |fruit |----|------ |1 |apple |5 |apple -> edit: there could be n apple rows here. |6 |banana |7 |apple How can I get this result: ...
Erik Bongers's user avatar
0 votes
2 answers
106 views

I run the below query against a view in MS Fabric environment (Data Warehouse). Here the compl_officer_id is the same across management_id partition (unfortunately there are no other unique values ...
muskagap88's user avatar
3 votes
0 answers
98 views

I have a table in Iceberg as below: spark.sql(""" CREATE OR REPLACE TABLE my_db.my_table ( serverTime TIMESTAMP, id LONG, ... ) ...
user32238701's user avatar
Advice
0 votes
4 replies
60 views

I’m using Google BigQuery (Standard SQL) to clean 2023 weather data. Missing values were mistakenly stored as 0, but 0 is a valid value for some rows, so I only want to convert the incorrect zeroes to ...
Sarah Jam's user avatar
-1 votes
2 answers
128 views

I am trying to flatten out two different tables for a report(view) but I am having a hard time. One table is tbRecord which contains a unique master record id and a sub table tbInspectedPart that ...
EasyE's user avatar
  • 587
0 votes
3 answers
176 views

Here is an extract of table B_TimeEntryMatter. ProformaNr ActivDate Description 451894 17/12/2025 To the provision of a Certificate of Incumbency by the Secretary; 451894 18/12/2025 To time spent in ...
user32213456's user avatar
Advice
0 votes
19 replies
75 views

I added a custom table to my database and I want to call on a particular row as defined by the ID and then display the string contents of another column in that row. The user makes a selection from a ...
Steve's user avatar
  • 39
1 vote
2 answers
71 views

I've consulted a few threads on how to calculate percent and I am not sure why but I do not get the same result as I expect to. This is the closest to my actual value: select round( (100.0 * ...
Sarah Mitchell's user avatar

1
2 3 4 5
13489