Skip to content
Advertisement

Tag: mysql

SQL – min(date) with conditionals

We ran a promotion where users can receive their first subscription order free. Price = $0.00 when a user uses the promo. I am interested in the data from Example A. Example A – User 50 started with …

MySQL how to solve One-to-one relation

I have a One-to-One Chat implementation with MySQL. The goal is to got for one user all unique Conversations with the last message. Even I’m using MAX on the primary key and group by 2nd column MySQL …

MySQL – save base64 encoded data to storage drive

I’m building an app that uses a temp table where chunks of a file are uploaded to, then a stored proc is called with a function that reassembles the file into the right order. I’m just wondering if there’s anything in SQL that would allow me to outright save the reassembled file to disk (eg. c:/path/to/file/filename), or if I need

converting varchar to binary in mysql?

I have the following data in a table like so: The data looks like this: I want to convert this into binary. How is it possible? I tried these queries but getting the same result: How to do this? My expected result is should be like this: Answer Since the accepted answer is unnecessarily complex, here a concise answer: TLDR;

return number of hashtag posts sql, mysql

I have two tables, 1) hashtags table & 2) hashtags_relation table. The first one lists the hashtags, and the second one relates the hashtag with a post. TABLE HASHTAGS id_hashtag | hashtag | …

return the Nth word from database

I want to get nth word from a column I’m using a code line and it works for me but there is an issue, for example: First line is: “the Nth word from database” Second line is: “return the Nth word …

Unable to Get the Proper Result : SQL Query Help Needed

Dear All, In the above JSP Code,sdata[j] is the array of table names and idata[i] is the array of usernames. what i am trying to achieve is, to retrieve final_grade from the tables sdata[j] with the username==idata[i] . Since the username is existing in some table it displays the final grade, but when no record found in the table i

Advertisement