Ok, so I have a table on an MySQL server, it has the following columns:
Key, UserID, datetime and position
Position can be “start”, “login” and “end”.
I want to find out the difference between start, sign in and end for each login event.
Anyone have an idea of an SQL query I could use? I think it has something to do with a query within a query?
I postulate that I would first SELECT the start event and then for each “start” event it should look for the next first login event (after the time of the start but less than one hour after the start) then DATE_SUB() to find out the difference. It would also be good to filter out “next” events that happen after a future “start” event in case end didn’t happen.
I would be very grateful if anyone could save me doing this in Excel or Perl.
We then took the train to Zell Am See, Kaprun and rented an apartment at the north end of town (Steinergasse) directly from the owner using Owners Direct. The apartment was well placed for access in to town; rather at the budget end of the scale but very capable.
It was quite basic but sufficient for our needs. We had a bit of a panic because the key handling agent wasn’t answering the phone when we arrived and the owner booked us into the Hotel Zum Hirchen which was very nice (he didn’t make much profit out of that week!). In the end it turned out that there was just an unfortunate miss-understanding during a difficult period for the agents, we entirely understood and were happy with the actions of everyone in the end.
We walked A LOT. We walked up to the cable car and took it to the Schmittenhohe, walked over to the next peak and back. Also walked to Schuttdorf via the lake and back via the hill walk. Found a really surreal bar open half way up the hill with a very drunk postman entertaining the confused travellers. Took the Schiff boat round the lake and generally relaxed (despite all the walking).
It was verrry quiet, we were told by friends, but a few places were open but not every day. There were a surprisingly large number of young Arab families there on holiday. I assume someone had the idea of advertising to them to fill the off-season. Few things more surreal for a westerner than seeing a lady in a full burqa at the top of a 2000m Austrian mountain. Not that I mind, I would say they seemed like they were enjoying themselves but many of them looked surprisingly bored!
Eating out was incredibly good value compared to many European countries (I’m looking at you Belgium and the Nordics!) and you never went hungry with the portions. Overall it was a great trip and when my partner told her mother about it she wanted to go. So looks like another trip next year!
Just a quick one, but I realised this morning that I have a compulsion to hit the character limit of twitter as accurately as possible when I post. Then it reminded me of the concept of a Haiku poem. Extract from Wikipedia for those who aren’t familiar with the concept:
Haiku (俳句,haikai verse)listen, plural haiku, is a form of Japanese poetry, consisting of 17 morae (or on), in three metrical phrases of 5, 7 and 5 morae respectively. Haiku typically contain a kigo, or seasonal reference, and a kireji or verbal caesura. In Japanese, haiku are traditionally printed in a single vertical line, while haiku in English usually appear in three lines, to parallel the three metrical phrases of Japanese haiku. Previously called hokku, haiku was given its current name by the Japanese writer Masaoka Shiki at the end of the 19th century.
This idea of being constrained by the structure can make you think and distill the essence of what you want to say. Of course there is a great deal of noise in Twitter, but when you next tweet, consider what you say.
I hear Heroes is a really good series and it looks along my lines. I think I'll give it ago.
On the other side, for those that don't know my girlfriend and I don't own a TV. This confuses the TV Licensing authority a great deal, after I contacted them to tell them I didn't own a TV they wrote to me to thank me for informing them but that they didn't believe me. Great!
So, now I have moved jobs and moved house (the one caused the other), and I am presented with a challenge. I work for a company which makes LCD TVs, STBs and PVRs; so my boss said I should take home our current PVR model and try it out. I pointed out to him that it would be difficult because I don't own a TV and he suggested that I take a TV as well. This now places me in a dilemma: I deliberately don't own a TV not on some moral grounds but on the basis that we tend to find better things to do than to fall into the trap of falling onto the sofa, switching on the box and mindlessly watching whatever is on.
I think I will end up taking a TV, however we are tempted to resolve not to watch live TV. By using new features such as "Freeview Series Link" I hope that we can just pick things that we hear about or read about and tag them for watching. Then we can sit down, look at the list of programme content and pick something we actuallywant to watch.