FAQ Database Discussion Community


SQL - return records with multiple categories

mysql,sql,sequelpro
I am relatively new to using group by and aggregate functions in SQL, I have the following tables: CREATE TABLE `artists` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR( 100 ) NOT NULL ); CREATE TABLE `genres` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR( 100 ) NOT...

SSH Port forwarding failed when trying to connect to remote database via SSH

mysql,unix,ssh,digital-ocean,sequelpro
I am trying to connect to my remote MySQL database at my DigitalOcean SSD via SSH using Sequel Pro. This is my setup: Name: MyWebApp MySQL-Host: 188.226.150.240 User: localhost Password: mySQLpassword Database: rails Port: 3306 SSH host: mywebapp.com SSH user: root SSH key: ~/.ssh/id_rsa SSH port: 22 When trying to...

Remote login to Heroku postgres?

ruby-on-rails,postgresql,heroku,sequelpro
I have a rails app hosted on heroku that uses postgres as the db. I'd like to manage a few records of the db using a visual db management application, like Sequel Pro. Sequel Pro needs the credentials of the database to log on (host, username, password, database, port). I...

Created view loads every time I want to see the contents

mysql,sql,sequelpro
I got a weird situation where each time I want to see the contents of a generated table view it starts loading the data instead of immediately showing the data. When I use this query the data will be showed immediately: CREATE VIEW train_set AS SELECT * FROM logs where...

Mathematical operations using MySQL

mysql,database,sequelpro
I want to do a couple of mathematical operations using different columns from different tables. Say I have two tables A & B: A Value Size Pack ----------------------------------------- 234567 10 1 234589 20 1 234561 30 2 B Value Quantity Amount ----------------------------------------- 234567 5 200 234589 10 300 234561 8...

How to change a string to a date during import using Sequel Pro?

mysql,string,date,sequelpro
I'm trying to import a file into a MySQL table using Sequel Pro. I know I need to use STR_TO_DATE, but I can't figure out the right syntax. I'm getting a bunch of these errors for each row: [ERROR in row 1] You have an error in your SQL syntax;...