674,182 questions
Advice
0
votes
3
replies
50
views
How to create a dynamic todo list app using flask, sql, css, JavaScript, HTML, in pycharm
Good day Everyone, Please I am new to programming and I’m trying to create a specific todo list that has the google keep kind of thick boxes, but I want to create it with flask so I can store it with ...
Best practices
0
votes
0
replies
68
views
What are the best tools to use when developing Pricing Calculators for Small Businesses?
What are the best approaches you have seen developing pricing calculators for small businesses. For example, I was able to build a small one for a window installment business a couple of months ago ...
Advice
0
votes
0
replies
59
views
Should I create a clustered index on a data warehouse fact table?
I work with a SQL Server data warehouse, where performance from both the load and query perspective is often important. There are a number of fact tables without a primary key.
One legacy table (80M ...
Best practices
0
votes
4
replies
97
views
How to use concat
I'm analyzing wind speed and visibility data from 2023 in BigQuery, but the dataset wasn’t cleaned and missing values were entered as zeroes.
I'm trying to update those zeroes to NULL before running ...
0
votes
2
answers
149
views
SQL for pivoting
I have generated a view in SQL Server; it is basically a payslip table with different rows for the same employee for the same month.
I want to get the whole thing into a single row i.e one row per ...
Advice
0
votes
5
replies
128
views
Best SQL Function for Text Filtering
I am examining a large data set on sports activities amongst a population of people and need to find all entries of the word "soccer."
What is the best SQL function to filter all entries ...
Advice
2
votes
6
replies
131
views
Parsing a field into multiple records
I'm not sure how to name what I want to do, or even if it's possible, but this is my situation. I have a table with 2 fields: ACCOUNTS & PROGRAMS. The PROGRAMS field is a concatenation of a ...
3
votes
4
answers
180
views
Import large CSV files with many unknown column names and types (auto-detection)
Using PostgreSQL 18, I want to import a large .csv file with unknown column names and types. I have 2 related .csv files:
The 1st file contains around 100 columns and 2,000,000 rows of data, like ...
-1
votes
1
answer
95
views
Handling outliers of ratecard in Oracle [closed]
I am trying to handle values that do not match the ratecard. Working in Oracle SQL.
Here is the scenario: cost is fetched from Rates table:
product type
power start
power end
height min
height max
...
-4
votes
2
answers
121
views
LeetCode 1251. Average Selling Price [closed]
I'm doing "SQL 50" and solved 25/50 problems but this one got me confused.
So here's the problem:
Average Selling Price
Input:
EXPECTED OUTPUT is that average_price needs to be 6.96 and 16....
-1
votes
1
answer
86
views
How do I get a trigger to only delete an associated row in another table in SQL?
I currently have 3 tables:
CREATE TABLE IF NOT EXISTS customers(
ID int unsigned NOT NULL AUTO_INCREMENT primary key,
first_name varchar(50),
last_name varchar(50),
email_address ...
-2
votes
2
answers
119
views
Basic SQL query to find all records using AND criteria
My database has a table Items of items using ID as the primary key. Another table Tags lists attributes of the items (Topic) using ItemID and Topic as a primary key. An item can have one or more ...
0
votes
0
answers
115
views
SQL JOIN returning duplicate rows instead of expected results [duplicate]
I am trying to combine data from two tables using a JOIN, but I am getting duplicate rows in the result instead of the expected output.
Here are my tables:
Customers
CustomerID
CustomerName
Orders
...
-2
votes
2
answers
106
views
Row inserted without error, but not showing up in the table [closed]
I added this row and MySQL showed
1 row(s) affected
But even when I counted the rows before and after inserting the row, the count is the same. I believe it means the row was not inserted. Then why ...
Advice
2
votes
9
replies
110
views
When to prefer application code for syncing denormalized columns over a trigger?
Take the example of SO: you have a votes table and a posts table. You want to keep in sync the vote count for each post but the votes table is the source of truth.
You can use statement level triggers ...