Questions tagged [mysql]

MySQL is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). DO NOT USE this tag for other DBs such as SQL Server, SQLite etc. Those are different DBs which all use their own dialects of SQL to manage the data.

0
votes
0answers
8 views

Error when including group by and order by in union all operator

SELECT productspec_crud.id as id,clause_no FROM design_models INNER JOIN productspec_crud ON productspec_crud.prod_id=design_models.prod_id WHERE design_models.id = '13' union all select ...
0
votes
1answer
7 views

List the first and last names of all customers whose first names start with the letters 'A', 'J' or 'T' or last names end with the substring 'on'

Lucky Customers Description List the first and last names of all customers whose first names start with the letters 'A', 'J' or 'T' or last names end with the substring 'on'. Arrange them ...
0
votes
0answers
5 views

How can I use COALESCE to simulate "IF/ELSE" inside WHERE IN for multiple values?

How can I achieve this with COALESCE, or something else? I found out about COALESCE here, but this approach is different, as I am not joining a table. Case won't work because it cannot return multiple ...
0
votes
3answers
19 views

i am having a problem with not in function in mysql, here is the query

delete from emploee_id where id not in(select max(id) from emploee_id group by name,dept,salary,experience); while running this query the error is showing as like this "Error Code: 1093. You ...
0
votes
0answers
8 views

Grafana: Counting elements with from/to lifetime in a time series

What I have is a table, where for each row I have a live_start and a end live_time (which may spawn different lengths), so to say the lifetime of the element. For a time series graph in Grafana, which ...
0
votes
0answers
14 views

Basic Syntax usage in SQL

Is there a way to not be so dyslexic with the syntax that is used in SQL? To be more specific, I’m making really easy errors with the queries that I’m writing. Also having issues knowing what commands ...
0
votes
1answer
21 views

How to get users by last message in Laravel Eloquent

I'm currently developing a simple chat application with Lravel 8 and VueJS. I need to order users by their latest message and get the last message along with user. Below are the tables i am using. If ...
0
votes
2answers
15 views

How this query can be answered ? Select SUM(1) FROM table

select * from "Test"."EMP" id 1 2 3 4 5 Select SUM(1) FROM "Test"."EMP"; Select SUM(2) FROM "Test"."EMP"; Select SUM(3) FROM "Test&...
-1
votes
0answers
15 views

Use UUID V4 to link two php forms

looking for help implementing the UUID V4 function from here into my two forms. If the flow goes: complete form 1 -> create & store UUID for form 1 -> route to form 2; how do I get form 2 to ...
0
votes
1answer
14 views

Eliminating Duplicates from combobox C#

Greetings i am facing this problem where i need to remove any duplicates that are being populated from mysql database into the combobox. this is my code: void fillcatagory() { string query ...
0
votes
0answers
12 views

Why does Laravel introduce a phamtom column in phpmyadmin database

I am creating an Photo album project. Where one can upload an image then by clicking on the image to a new page the user is able to upload many photos that will be contained in that album. This is the ...
0
votes
0answers
9 views

Stored Procedures backup on "Error: MySQL shutdown unexpectedly"?

I have opened XAMPP to start working and I have gotten the error that states Error: MySQL shutdown unexpectedly I fixed everything following the steps in this question But after I started ...
0
votes
1answer
18 views

how to combine three columns and remove duplicates in sql

I have table with 7 columns where I want to combine three column and want to remove duplicates. Your help will be appreciated. SELECT warranty_indicator, account, date_sold, ...
0
votes
0answers
13 views

why CANT The screen display data table?KivyMD

import mysql.connector as sql details = {} connect = sql.connect(host= 'localhost' ,user = 'root',password = "****" ,database='courier_service_system' ) sqlcursor = connect.cursor() ...
0
votes
0answers
8 views

mySQL Stored Procedure store paramters for update

I am trying to write a mySQL stored procedure. Due to SQL_SAFE_UPDATES, it is required to use the ID column to use in the WHERE clause for updates. Due to this, what is the normal approach to also ...

15 30 50 per page
1
2 3 4 5
42731