Category "mysql"

Slow count query with group

I have a common aggregation query: SELECT products.type, count(products.id) FROM products INNER JOIN product_colors

How to select record in the database using BETWEEN in sql?

How to select record in the database using BETWEEN in sql? what I want here is to select record within the startDate and endDate. if the record is exists within

Filter my select options by department and location

I have a problem in my website, I have 2 dropdown selects that are Departments and Locations, my problem is when I select a certain department and start typing

Is there MySQL syntax for joining more than three tables when inserting?

Here is my query: INSERT INTO film_new (SELECT title, rental_rate,length,film_id,length,release_year FROM film) JOIN film_actor ON film.film_id = film_actor

Joins on database engine vs on client-side [duplicate]

I am creating an API with express.js for a food app and I can't figure out what is the best (most efficient) way to query the data and send it

Tunning MYSQL have many schemas

I have a DB MYSQL with many schema. Around 5k - 7k schemas. My system sometime meet OOM Killer case. Is that unnormal ? we have 5 scheme different structure. Th

Tunning MYSQL have many schemas

I have a DB MYSQL with many schema. Around 5k - 7k schemas. My system sometime meet OOM Killer case. Is that unnormal ? we have 5 scheme different structure. Th

Adding Keepalive option to MySQL connection causes error "Unable to connect to any of the specified MySQL hosts"

I am working on a project where a thread is run and opens a permanent database connection. The reason for this, is potentially as the project grows it could rec

Mysql exists operator not working correctly or there is any other problem?

I have two tables txn_maxvoucherno (companycode, dbcode, vouchertype, fyear, series, voucherno) txn_vouchersdetails (voucherno, vouchertype) I am executing a st

Temporary table deletion cant find the temporary table(no such file or directory)

SQLSTATE[HY000]: General error: 6 Error on delete of '/tmp/#sql_10f07_0.MAI' (Errcode: 2 "No such file or directory") this error has started to pop up every no

Pythonanywhere MySQL-Connetion from outside

I tried to connect to my MySQL-Database from my Home-PC and got the error: 'Can't connect...' Inside this Server with Skript and Konsole I've got no problems, b

MySQL importing and replace [duplicate]

I have a table with 2 columns: Id | Date 1 | 2022-04-01 With tons of row, like 30k I need modify all the dates, so I want to upload a CSV wi

how to fetch data and tag Element but not json data using axios from php Apache server in XAMP?

I have a front end code of react is import React,{useEffect,useState} from "react"; import axios from 'axios' export default function DataGridDemo() { con

Get top n records for each group of grouped results

The following is the simplest possible example, though any solution should be able to scale to however many n top results are needed: Given a table like that b

Uncaught Error: Class 'Service\UsersService' not found

I'm trying to run my php-based application, which connects to a mysql DB, launched through docker-compose. i get this message when i connect to localhost: Fatal

Query to get Woo products in a parent-children order

I want to build a MySQL query for a Woo database schema to get simple/variable products, but in a specific order: I want to get them in an ID ASCending order, b

Modify MySQL query to produce to right data

I am trying to produce a data from a football table. The table can be seen below and the data that is needed is highlighted. The data that needs to be produced

Trying to utilize a window function instead of this script

I'm trying to improve my query for this topic at hand. I'm trying to find the top 5 and bottom 5 growth rates per state from 2020 to 2021 in my org. The table h

What does a zero value coalesce function do?

I have been exploring dbt tools and I came across the following code snippet : coalesce(customer_orders.number_of_orders, 0) as number_of_orders I understand th

Mysql WHERE condition against a JSON_TABLE value

I got a list of IDs as comma seperated list of JSON values and some example data sets are like below [340596,340597,340595] This list can be huge sometimes 50k