Tag: syndicated

  • DEN to LAX Views

    I wrote about this trip for an editorial, and here are a few views from the airplane. I love the flight from Denver to LA, though I wish I were on the North side of the plane. There are better views that way. Unfortunately, I was South both ways, though since I got upgraded, I can’t complain.

    I left Colorado, and here are the mountains with a little snow.

    20220421_093916

    The view coming into LA, the land giving way to man made structures.

    20220421_094901

    A good view of just how built up LA can be.

    20220421_095255

    Heading home, taking off over the ocean

    20220422_173115

    Coming around from the ocean, now heading East as we cross back over land in LA.

    20220422_173932

  • Daily Coping 5 May 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to listen to your body and be grateful for what it can do.

    I do this more and more as I age. For those of you that are under 40, take care of your body. Work hard, exercise, but be careful. I know sports or activity can cause injuries, but you want your body to work well for a long time, so beware.

    Also, start yoga, tai chi, or some slower exercise that stretches and works your body.

    I tweaked my back recently, which necessitated a visit to the chiropractor. An adjustment helped me feel better, but the muscles and joints were upset. The next few days I had to do a little less exercise. I went to yoga a few times, but I listened to my body, moving slower and less stressfully as I tried to get exercise without causing more injury.

    It was a good reminder of how much I appreciate what my body can do and how impactful an injury can be.

    I do appreciate every day that I can get up and do things on my own.

  • Daily Coping 4 May 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to meet a friend outside for a walk and a chat.

    I have low social needs, but I do have a few. I like getting together with people periodically, and it’s one reason I love my job. I get to travel and see people in my industry all over the world.

    I don’t do this enough in Denver, but I decided to give this a try recently and meet a friend. We get together for lunch sometimes, but this time I asked to get together and walk around a bit instead of a meal.

    Looking forward to the time outside.

  • Comparing Daily Estimates to Actuals–#SQLNewBlogger

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    In a previous post I wrote about using a few tables to capture information about my solar system. With a way to capture the data for each day, I now want to report on this. This post will look at the first part of my reporting, which is the daily reporting.

    Scenario

    On a daily basis, I want to know if the system is producing more or less than the estimate for that month. If you remember from the previous post, there is a single row in a table for each month and then a row in a different table for each day.

    My estimates look like this:

    2022-04-25 16_30_53-SQLQuery3.sql - ARISTOTLE_SQL2017.way0utwest (ARISTOTLE_Steve (63))_ - Microsoft

    Each day looks like:

    2022-04-25 16_31_19-SQLQuery3.sql - ARISTOTLE_SQL2017.way0utwest (ARISTOTLE_Steve (63))_ - Microsoft

    What I want is a comparison of the actual output against the estimate for each day that I have data. I don’t want to see a number of zeros unless the system produced no power. What I really want is the estimate expanded to cover each of the days of the month for which I have actual data. I want to see this:

    2022-04-25 16_36_50-SQLQuery3.sql - ARISTOTLE_SQL2017.way0utwest (ARISTOTLE_Steve (63))_ - Microsoft

    A Simple Join

    This is very simple query to write. It’s really a join between the two tables, based on the month. If I join on month, then the data from the estimate is returned for each row of actual data where the month’s match.

    I can then assemble the date in the results using DATEFROMPARTS(). When I do that, I have this code:

    SELECT
       DATEFROMPARTS (spa.trackingyear, spa.trackingmonth, spa.trackingday) AS ProductionDate
    , spa.actual_daily AS Actual
    , spe.estimate_daily AS Estimate
    FROM
       dbo.SolarPowerActual AS spa
       INNER JOIN dbo.SolarPowerEstimate AS spe
         ON spe.trackingmonth = spa.trackingmonth
         ORDER BY ProductionDate

    This gives me the results I need, and it works well. Since I have numeric values for the months in both tables, this is a very quick join, especially when those columns are indexed. In this case, most of the time the index won’t matter as we really are pulling most of the data from one table and the tables are so narrow that the index might not ever help.

    I’ll compile this code into a view, which I can use for more detailed analysis.

    SQL New Blogger

    I was building this system to track some data, and decided to split up each section into a separate post. If you look at the first post and this one, you will see they are both short and could be combined, but I wanted to separate them into different topics, as well as schedule them separately.

    A good technique you can use on your blog to separate out topics and ensure a more consistent pipeline of content as you publish information about you knowledge.