MySQL: Counting every different IP address only once by ID

I posted this question as a new topic for him to give an appropriate name and a new start.

I think that it is a challenge for all those who want to try taking over by:

The following statement displays each submission read on my site in the last 7 days, ordered by number of views. I would like to than the "id_count" to count each once unique ip address by submission id. So if the same ip address seen even 5 times in the last week, it should only be considered once. How can I make this work?

Here's the statement from MySQL:

SELECT submission_views.submission_id, submission_views.timestamp, submission_views.ip_address, COUNT (submission_views.submission_id) AS id_count, submission_data.id, submission_data.thumbnail_source, submission_data.title
FROM submission_data JOIN submission_views ON submission_views.submission_id = submission_data.id
WHERE submission_data.type = 'game' AND submission_views.timestamp > DATE_SUB (NOW (), INTERVAL of 7 DAYS) AND submission_views.timestamp < NOW()
GROUP BY submission_data.id
ORDER BY id_count DESC

Try Count (Distinct submission_views.submission_id, submission_views.ip_address) as id_count

Tags: Dreamweaver

Similar Questions

  • How to make shift register init happens only once, so that the data can persist across multiple tracks of a loop?

    Here's the situation:

    We are repeatedly followed eight real-world signals and comparing them to a threshold value.  We do this via a loop For inside a While loop.  The loop For runs eight times per pass.  We have implemented a binary table 1 d and the use of the index of the loop For as the array index, by putting a Boolean result in the table using the function replace table subset.  We want to keep the data in the table to be 'sticky', in the sense that any True value is locked, so even if a fake comes later, this array element true.  However, since we initialize the array in order for the replacement to the work table, we see that whenever the loop For again, it resets the table and destroys the history.

    I have attached a simple VI to illustrate the concept, using a random number generator as a stand-in for the real world signals.  How we change this VI do and entered real lock through multiples for loop runs, indefinitely?

    In case it is not obvious, I am a relative beginner, so please keep count in your response.

    Thank you

    B

    scottbbb wrote:

    For B, although I love the simplicity of it, I have a question: it solves the problem of the re-initialization?  What the shift of the While loop register get initialized - only once during its launch?

    Yep, the shift register Initializes only at the beginning.  You could say that every time the while loop is called (not each iteration) the shift register is reset with the wrong table.

    And, Yes, GOLD will always keep a REAL when it is TRUE.

    Usually, the simplest solution is the best.

  • Google Maps: pan and zoom controls are not displayed. 'PIN' markers can appear only once, and then disappear.

    Loading Google Maps, either directly, or where they are incorporated into other sites, orders pan and zoom are not displayed. Location markers 'PIN' can appear only once, but disappear after doing anything with the card. I'm on the last Windows XP and latest Firefox. This problem is long-standing and has remained the same during several different versions of Firefox and Windows updates. I tried "CTRL-0' no effect."

    Problem solved by 'Reset Firefox'. Before that, tried "Safe Mode", no difference. Not aware of the limits on the cookies or the memory usage. Controls on the left (Pan, zoom) for Google Maps were good here and in usual and sizing correct positions and could be found with the cursor and activate it, but 'ghosts' that were not display. Same problem if the content was maps or satellite pix. Reset solved the problem.

  • When I use the library function node call in real time, is loaded only once for all or load the DLL whenever it is called?

    When I use the library function node call in real time, is loaded only once for all or load the DLL every time when it is called?

    I have a critical application in real time, in which I use a piece of DLL function developed in C++.  It is ok?  Make sure any senior developer?

    Thank you in advance.

    The user interface thread is the thread that is used to update the user interface. It's slow. And it's supposed to be that way because humans are slow.

    The call library function node can be configured as this thread to use in the configuration for it dialog box. Please visit the LabVIEW documentation on how to do this.

  • Route of the different IP addresses

    I have multiple IP addresses for a virtual server that is running Windows Server R2 2012 and I was wondering if anyone knew any software or all methods to deliver on a different IP address every time that I want. Thank you.

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Where is the best place to 'field of Application only once by application start initiation' coded?

    Dear all,

    Do you have any suggestions on where we should put the opening of scope application code?

    These codes should be used the first time user enter the app, but not every time when you navigate to a new page.

    I use bbUI and currently trying to put it in the webworksready listener in my index.html

    Is this supposed to be invoke only once or will be called each time when I refresh the screen using bb.pushScreen?

    I noticed it was triggerred several times, so this isn't what I want to achieve.

    Any other event listener could I use to put my 'field of Application only once by opening start?

    Appreciate for any suggestion or comment.

    This happens in fact because of the bug of the ripple, this ready recall webworks has been triggerred twice.

    So ideally, it won't be a problem.

  • Use of two different MAC addresses EX60

    Hello outthere.

    I use an EX60 for testing. Everything works fine, but my colleagues told me that endpoint uses two different MAC addresses. These addresses are seen on the switch will remain the ex60 ist connected.

    The situation has not changed after doing a factory default.

    It's a kind of Mystic, because my ex90 do not use two MAC addresses.

    So the question is, what is the diffrence between ex60 and ex90? Is this a normal behavior on ex60?

    I hope someone can help me!

    Greetings from the Austria

    Martin

    Hello

    Using a touchscreen on the EX60? I think that the 2nd MAC address will probably be that of the touchscreen attached. How to check? The MAC address of the EX60 can be verified using the API. SSH into the EX60 and run:

    XStatus network //Mac

    * s network 1 Ethernet MacAddress: "00:50:60:05:52:BA."

    * end

    Ok

    The MAC address of the button can be controlled via access root for the codec.

    SystemTools rootsettings on

    [dderidde-ex90-desktop: ~] $ arp - a

    ARM3. LocalNet (169.254.0.13) to 00:e0:0 c: 00:8 c: 43 [ether] on eth1

    arm0. LocalNet (169.254.0.10) to 00:e0:0 c: 00:8 c: 40 [ether] on eth1

    ARM2. LocalNet (169.254.0.12) to 00:e0:0 c: 00:8 c: 42 [ether] on eth1

    HSRP-10-48-2 - 1.cisco.com (10.48.2.1) at 00:00: 0C: 07:ac: 00 [ether] on eth0

    ARM1. LocalNet (169.254.0.11) to 00:e0:0 c: 00:8 c: 41 [ether] on eth1

    Arm4.LocalNet (169.254.0.14) to 00:e0:0 c: 00:8 c: 44 [ether] on eth1

    [dderidde-ex90-desktop: ~] $

    My contact is not directly connected, so can't see here, only the gateway address MAC address. But you should see the touch directly connected.

    Otherwise, there is a sticker on the back of touch with serial number, and I think, MAC also.

    We have a DDT open for this behavior.

    CSCtz86298 - 802. 1 x is not handled properly on device with PC port and / or Touch

    Greetings from Belgium.

    Danny.

  • I downloaded and installed creative cloud with an email address, and when I open it, it says that I need to check an old different email address that no longer exists. What should I do

    I downloaded and installed creative cloud with an email address, and when I open it, it says that I need to check an old different email address that no longer exists. What should I do

    Follow the procedure below:


    N ° 1)

    Launch the Task Manager and end all Adobe related tasks such as Creative cloud, CoreSync, AAMUpdater... etc.


    Step 2)

    Press Windows button (located between Ctrl and Alt buttons) with the key R together at once, you will get a command window.

    Type below command and press the enter"" key.

    AppData

    It will open the Appdata folder.

    Then navigate to local > Adobe > OOBE. Open the OOBE folder and delete the file " Opm.db".

    Once you had deleted the Opm.db file, run Adobe Creative Cloud application and check.

  • Topics appear twice in the list of topics, however, each does exist only once in the project.

    Some subjects appear twice in the list of topics, but each exists only once in the project files. What are the causes for this and what can do to prevent it? I am using HR 11.0.4.291. I deleted the CPD file.

    Here is an example:

    Change in all files in a folder specific to say the first element. There may be two files in the same folder that Windows does not allow that. My guess is that the duplicates are in different folders and change the folder will help you find the original and the duplicate.

    Also open both the list of topics. Should be the red squares in it? If Yes, you have sort of a release in the source.

    Post back with what you find.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Help! I used a different email address for my subscription of CC as my Adobe email address!

    Inadvertently, I used a different email address when I paid for my subscription of clouds that I use to connect to the Adobe forums. The result is that the programs that I have installed are 30 days in trial mode. Could someone explain a work around for this?

    I saw that someone referenced this page as a possible solution in this forum, but I don't see how this assistance: https://helpx.adobe.com/creative-cloud/kb/asks-serial-number-error.html

    Once you disconnect, change the email ID and then reconnect.

  • Buttons work only once or twice

    Hi guys, I'm still new to Flash and I really need help. Here is the story:

    so I do a simple digital comics right now, that shows one or two signs/pictures/drawings at a time with only 3 buttons to navigate (a next button, an exit button and a page selection button). Here is some info:

    -J' use CS6

    -J' I use simple tweenings for each photo (fade in/out, queries, etc.)

    -J' have it will publish in 2 formats, .exe and .apk for android

    -J' have 7 scenes, 1-6 for the main comic and scene 7 for the selection menu of page (within a clip)

    -I only use video clips of 2, one for the intro animation and another for page selection menu I mentioned above

    -because I'm still a noob, I always use excerpts of code (sorry)

    -J' I mostly only use these code snippets: stop at this image, click here to go to frame and to play, click here to go on stage and play.

    -for the exit button, I use this code:

    button_e.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler);

    function fl_MouseClickHandler(event:MouseEvent):void

    {

    fscommand ("QUIT");

    --utiliser use for the next button, copy the following code:

    button_1.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_3);

    function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void

    {

    gotoAndPlay (frame number);

    }

    for the page selection button, I use this code:

    b_page.addEventListener (MouseEvent.CLICK, fl_ClickToGoToScene_40);

    function fl_ClickToGoToScene_40(event:MouseEvent):void

    {

    MovieClip (this.root) .gotoAndPlay (1, "scene 7");

    }

    Now, here's the problem:

    The page selection button worked fine initially. Then I click on the next button several times (lets say, from page 1, stage 1, I clicked the next button several times until I got to page 6, scene 2). Then I click the page selection button that opened the clip. Inside of this video clip is several buttons another, each of them takes me on different pages. For example, I clicked on a button linked to page 7 (inside the scene 2). Furthermore, the code goes like this:

    b_7.addEventListener (MouseEvent.CLICK, fl_ClickToGoToScene_3);

    function fl_ClickToGoToScene_3(event:MouseEvent):void

    {

    MovieClip (this.root) .gotoAndPlay (500, "Scène 2");

    }

    Still no problem detected. Then I continue to click the next button to read the rest of the comic strip. At this point, the page selection button (and the exit button) has stopped working. Clicked on it so many times and nothing happened. So, just like what I wrote in the title, it does only once or twice.

    Any suggestions?  (I wanted to download the .fla so you guys can take a look, but the size is too much )

    Screenshot:

    http://S25.postimg.org/azarwqvzj/screenie.jpg

    Thank you!

    put the button of your first scene on its own layer at the beginning of the stage and set its name.  extend his chronology up to the end of the scene.  test.  all the problems?

    If not, add additional keyframes in the layer of the button according to the needs of your project, making sure NOT to remove the button no keyframes.  test.  all the problems?

    If this is not the case, do the same for the other buttons in the other scenes.

    If you want your button to NOT appear in some frameworks do NOT for this key frame.  set its visible property to false or using removeChild.

  • Play audio only once on a slide

    Someone had never had to ensure audio will play only once on a slide?  On a particular slide there are buttons for the learner to click jumps them to another slide, then a button to bring them back.  When they return to the slide, I don't want the audio replay.  How can I do?  I have a tip on the slide Action enter because once each of the buttons are clicked, the button 'Continue' will appear.  In addition, I have a tip action that shows a "tick" beside each button that they have clicked.  I am at a loss on how to make the audio game once (the first time they visit the slide).  Any ideas will be greatly appreciated.

    No, it would never work... not very logic your requirement and I do not see the audio statement at all.

    So, you want to do everything with the action on enter. OK, here go us:

    1. Create the variable user v_entry with a default of 0, which will be used to count whose entry into the slide, it is.
    2. Create an initial decision which is a simulated standard action to increment the counter:
      • IF 1 is equal to 1
        Expression v_counter = v_counter + not need an ELSE part 1
    3. Create a second decision to decide to play an audio clip
      • IF v_counter is equal to 1, which is not the case on the first entry
        Play the audio xxxx indicates the audio to play clip
    4. Use the ALLCLICKED decision you had before

    Lilybiri

  • vcbMounter works only once

    I use the following commands to mount the files from a virtual computer to back up these directories:

    vcbMounter h esx-mgmt - u secretuser - an ipaddr:file1 - r S:\secretdirectory\file1-files t file secretpassword Pei - san m

    Then the backup application creates the backup. Once the backup is complete, the following command is executed:

    vcbMounter h esx-mgmt - u secretuser secretpassword Pei - U S:\secretdirectory\file1-files

    This procedure works only once. When I run a second time, I get the following error message:

    ~ Error: did not find VM specified by ipaddr:file1 ~.

    Also vcbVmName no longer works.

    vcbVmName h esx-mgmt - u Administrator PEI s password ipaddr:file1

    No match found VMs.

    "Tip: If you are looking for a machine virtual address DNS IP/name cannot succeed if the virtual machine is turned on and running VMware Tools or is listed in the file cache VM name specified using the"

    -c"option.

    Workaround for the time being, I have found is to connect to this server from file1 and then close again. After this process, I can still make a backup.

    Any suggestions?

    Its a bug between VMware Tools and VCB. Check out this KB->http://kb.vmware.com/kb/1008709

    Dave Convery

    VMware vExpert 2009

    http://www.dailyhypervisor.com

    Prudent. We do not want to make of this.

    Bill Watterson, "Calvin and Hobbes".

  • Look at a swf in HTML-user can view only once

    Hello

    I have my swf files which are called in the browser when the user opens the page.

    To ensure that my swf is not used by the user for its other objectives, I got it as a strict view from the HTML page that has a variable. Same variable increased from swf in HTML code.

    If the two variables match only swf then starts preloading. This works very well for the first time.

    But when the user open the same page, second time, is no longer able to view the preloader that does not progress further.

    When I delete my temp file so the user is again able to view the swf only once file.

    Can someone tell me;

    1. What is the reason the swf for the temporary file cannot access variable of its HTML code

    2. I do it wrongly?

    3. do I need to clear the cache every time, or there is another method to do?

    Thank you.

    Hi kglad,.

    I found the solution.

    whenever I used "Play();" action I changed it with "gotoAndPlay();

    I found somewhere on the net that play, stop the actions sometimes fail with IE & I just replaced "play()" with "gotoAndPlay()" it was like a magical thing and my swf works fine under IE now.

    Thank you for your reply & help.

  • How launch banner in browser only once per session

    Hello. I had a problem. I created a flash banner, put in to my server and do not know how to throw banner only once, then I come to my site. It's the launch every time, then I refresh the Web site or by clicking on the menu items. If anyone can help with this problem?

    You will need to use cookies if you want to remember things to control a swf from revisiting a page.  To create Flash cookies, you need to look at using the shared object class.

    You might be able to use the regular cookies, but this would require the implementation of FlashVars by having something to read the cookie and write dynamically embedding code for the swf file.

Maybe you are looking for