I need a bit of help I have a database that looks something like this: and I would like to separate this table creating 1 column per queue and grouping the times to have a unique list as I only …
Tag: database
Splitting alphumeric column in SQL
I currently have a dataset looking like this J_J WMT MSF 6.7M 167.8M 1.6k 544K 700.7B 875k 888.7B 900K 98.5M I want to split the string values for each column so …
Does adding the guaranteed where condition on sql can improve performance?
Let’s say there’s a table about logging website access. (id is the only index column) | id | domain | logged_at | |—-|————|————————–| | 1 | yahoo.com |…
Partition by with condition statement
I have data of products that are sold by various shops. For some shops they are sold with discount mapped by PROMO_FLG. I would like to display two COUNT PARTITION columns. First displays all shops that thave this product (which is done) COUNT(DISTINCT STORE) OVER (PARTITION ITEM) would give is 10 Second one – which I seek – counts only
PonyORM Database Table Dynamic Definition
As far as I know from the research I’ve made, the typical way of defining a table using PonyORM in Python is like the following: from pony.orm import * db = Database() # Database connection … class …
Flat file NoSQL solution [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 2 years ago. The community reviewed whether to reopen this question 1 year ago and left it
I am getting a NoneType error when trying to work with Python and Sqlite3
This is a chunk of the code I am using. I am currently making a discord bot, and have several other commands that add to a column. However, on the “classs = …” line, the third line in my code shown above, (extra S is on purpose) I get this error: TypeError: int() argument must be a string, a bytes-like
SQL Multiple data input at the same time
there are 2 different queries below. How can I run them at the same time? I mean, these 2 data’s will be into on the same row. For example: https://prnt.sc/rtkytf Answer Doesn’t this do what you want? Otherwise, if you really want to insert four rows: The default value is often NULL (because no DEFAULT is specified). If you know
How to prevent including database config.php from another client?
We have this config.php file: And this structure The index file is accessable via www.example.com/index.php, but the config.php file too (via www.example.com/config.php). Can others just include www.example.com/config.php in there php files and execute code with my $conn? How to prevent this? Answer It’s true that if you leave files in the web root, the web server will execute them when
Find all users with a unique last name
I have a table users. I wrote a sql query that displays all users with a unique last name tell my why query removes collapsed users name2 and name3? HAVING COUNT(DISTINCT u.first_name) = 1; How it works? help to understand how it works Answer The query is aggregating by last name and counting the number of users. Run this version