SELECT COUNT(recycled) AS “Total”, SUM(CASE WHEN recycled = 1 THEN 1 ELSE 0 END) AS “New”, SUM(CASE WHEN recycled > 1 THEN 1 ELSE 0 END) AS “Recycled” FROM (a SELECT phone_number, count(*) AS recycled, sale_date FROM ( SELECT DISTINCT * FROM ( SELECT customers.phone_number, customers.sale_date FROM customers INNER JOIN ( SELECT customers.phone_number FROM customers WHERE sale_date BETWEEN ‘2014-05-23’ AND ‘2014-05-30’) list on customers.phone_number = list.phone_number ORDER BY phone_number DESC, sale_date DESC ) AS multiple_sales ) AS sale_dates_analysis GROUP
Tag Archives: database
I have a situation with a relatively small set of MySQL data (5GB) and a decently large set of available ECC DDR2 memory (32GB). Therefore, I am evaluating storing the entire MySQL data directory on a ramdisk. Along those lines, here are some initial resources:
I had forgotten how to dump a specific table using mysqldumb (normally I just dump the entire DB) but thankfully RolandoMySQLDBA had the simple answer! Thanks for the help 🙂 “If you are dumping tables t1, t2, and t3 from mydb” mysqldump -u… -p… mydb t1 t2 t3 > mydb_tables.sql via mysql – How do you mysqldump specific table(s)? – Database Administrators. Rating 5/5 stars, easy and intuitive!
Links and info that were useful during a recent database server move: #1 Setting (or changing) a static IP address on Gentoo: Linux command to check size of hard drive disk – Linux / UNIX Forumhttp://nixcraft.com/linux-software/577-linux-command-check-size-hard-drive-disk.htmlHai, Ok as i said erailer i did order new linux dedicated server. I just want to verify that i got 120GB hard disk so what command i need to type to find out hard disk size? can… #3 ProFTPd MySQL configuration ProFTPD mini-HOWTO –
It’s always fun to come across awesome new sites! I found Jeff Foster’s site Fatvat when I was searching for some info about Oracle and Larry, Prince Of Darkness… after reading about it on Engadget. Anyway, after all that, here’s some really cool stuff that should be very helpful to some of my database projects: Freebase http://www.freebase.com/What is Freebase? Learn what an entity graph is, what kind of information it contains, and why you should add your data! Learn More