Category "mysql"

How to get distinct value and specific count from a query

Suppose I have the following table "Person": id name friends 1 matt jim 1 matt ray 1 matt ray 2 tim fry 3 sally jack 3 sally tim 4 matt harold I want to outpu

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) on Windows

when i want start mysql in windwos cmd i got this error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) what can i do? mysql

How to use pandas.to_sql but only add row if row doesn't exist yet

I have some experience with python but very new to the SQL thing and trying to use pandas.to_sql to add table data into my database, but when I add I want it to

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

I am new in PHP and when I am trying to connect my database with PHP it is showing error Uncaught PDOException: PDO::__construct(): php_network_getaddresse

How can i overcome AWS Aurora Data api timeout in 45seconds

AWS Aurora Data api(I'm using https://www.npmjs.com/package/data-api-client) has a fatal drawback of a 45-second timeout, is there a way to overcome it? The sea

mysql time format to get only hours and minutes

I am struggling with the syntax for a MYSQL query. I am currently just grabbing all fields via select * from TABLENAME. It works but the fields that are type=t

mysql time format to get only hours and minutes

I am struggling with the syntax for a MYSQL query. I am currently just grabbing all fields via select * from TABLENAME. It works but the fields that are type=t

SQLModel: how to load specific columns?

I tried to load specific columns from a table via the following method: from sqlalchemy.orm import load_only from sqlmodel import (Field, Session, SQLModel, cre

Refresh specific HTML content that retrieves data from MySQL

So i have a form that that does a simple calculation, depending on the users input. If the results is a certain value then it stores that value in a database, t

Error with creating a laravel foreign key

I'm trying to create a relational database and this is the error i get SQLSTATE[HY000]: General error: 1005 Can't create table somedumbtable.meals (errno: 150

get the most common value for each column

I'm attempting to create an SQL query that retrieves the total_cost for every row in a table. Alongside that, I also need to collect the most dominant value for

returning the LINESTRING of the part of a POLYGON that falls within another POLYGON?

I can see if two POLYGON's intersect with one another using MBRIntersects(g1, g2) but is there a way to return the LINESTRING part of g1 that falls within g2? A

live goelocalization of objects within a limited area with an existing data

I want to present and visualize multiple objects (with their height represented in cylinders, their directions, and other characteristics ) in a limited area o

Check if a number is prime or not in mysql

I am wondering what's the best way to check whether a number is prime or not using sql. I was able to generate the sequence of numbers from 1 to 1000 but I woul

Errors when connecting to MySQL local database

So, I have my local database, set it up, ran it from the windows services window. I open MySQL Workbench, and try to connect to the server. Hostname is localho

const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes) - TypeError: require(...) is not a function

I am beginner in web dev and trying to create a project using Mysql, Node.js with Express. Facing this TypeError issue while using Sequalize. Can someone please

How do I convert (node js) sequential processing of AWS log stream to mysql local db to parallel processing, without Error: Pool is closed. message?

The node js code operates as follows; fnGetLogEvents() calls AWS GetLogEventsCommand to get the events of the log stream putCloudwatchLog is called to convert e

MySQL upgrade causing unexpected results on simple WHERE clauses

I'm upgrading my Laravel app to use MySQL 8.0.23 from 8.0.20, and I see an issue with WHERE clauses that produce unexpected results. SELECT * FROM guilds W

What will the best solution for this multiple optional filter?

These are all optional fields, so will I have to write multiple queries with conditions or is there any way to handle this using Laravel? What will be the query

Select records and group each time column changes

I have this (MySQL) database, sorted by increasing timestamp: Timestamp RateSingle RateDouble RoomId 2022-01-01 100 150 1