+——+——+——+————+ | id | room | type | created_at | +——+——+——+————+ | 8214*| 83 | msg* | 1571726466 | | 8213 | 83 | msg* | 1571724983 | | 8212 | 83 | ad …
Tag: mysql
MySQL: Is it possible to set a variable outside of SELECT with SELECT as the only permission?
WHAT I’m on MySQL 5.6 and my account only has permissions for SELECT and USAGE (as found using the SHOW GRANTS command). Presumably because of this using DECLARE before SELECT returns a generic …
How to represent X and Y axis data in an SQL table
I have a table of data in excel that looks like this: I need to get this data imported into an SQL table. Eventually I need to be able to query the table by saying something like: Select the value where x-axis equals 762 and y-axis equals 889 – this should return 30.60. What is the best way to represent
MySQL: Best way finding rows, where associated list match a given list
I built a SQL Statement, explained here: I have a table Account like this: I have a table Customer like this: I have a relation Customer_To_Account like this: I want to find all accounts which are assigned to customers in a given list like (111111, 222222). The returned accounts MUST contain at least one of the given customers and they
My SQL Python ProgrammingError: 1064 (42000) [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 2 years ago. Improve this question I am trying to store scraped data with scrapy to a sql database but I get the following error: ProgrammingError: 1064 (42000):
MySQL query delivers wrong result when using (not equal) in WHERE clause
I came accross a strange problem with a MySQL Query The problem is, that the last query (Members with lastname != ‘Smith’) returns 0. If there are 100 members in total and 20 members named ‘Smith’, the number of member with other last names should be 80, shouldn’t it? I tried different version using <>, !=, enclosing Smith with ‘
Captalizing Each Word of an existing table
I have a table called ‘Artists’. There is a column called Artist in ‘Artists’. Artist firstname lastname Firstname lastname Firstname Lastname firstname I tried the query on this Post I want to …
how can i fetch the name from id by using this query?
there are 2 table tbl_hk and tbl_hk_work: tbl_hk:hk_id(pk), hk_name tbl_hk_work:hk_work_id, hk_id(fk), hk_work_date, hk_work_1bed, hk_work_2bed, hk_work_time and I have written a query to fetch sum …
Find users with most number of common pages they liked
I am trying to find pairs of users who liked the same pages and list the ones who have the most common page likes at the top. For simplicity I am considering the following table schema Likes (…
MySQL Query Help for Multiple Tables
Alright so I’m working on a final assignment and I’m super stuck on this one task. I’ve tried looking it up and reading guides and I got nowhere. To make matters worse, my professor hasn’t bothered to teach us how to do this particular type of task and I can’t bother asking him for help since it takes him days