sql stringlengths 6 1.05M |
|---|
SELECT * FROM `' . ParseINI::parseValue('mysql_prefix', $this->config) . 'games` WHERE `ip` = \'' . $_SERVER['REMOTE_ADDR'] . '\' AND `valid` = \'1\'', $this->link);
SELECT * FROM `' . ParseINI::parseValue('mysql_prefix', $this->config) . 'games`' . $append);
CREATE TABLE `c4ms_update` ( `old_version` varchar(16) CHARA... |
CREATE PROCEDURE ImportDowntimeTable
AS
Insert Into Downtime
Select b.*
From DowntimeImport b Left Join Downtime a
On a.Unit=b.Unit and a.StartDate=b.StartDate
Where a.Unit Is Null;
Delete From DowntimeImport;
GO |
<filename>bank.sql
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 20, 2021 at 07:45 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
CREATE TABLE IF NOT EXISTS Calendar (
[Months] TEXT NOT NULL,
[BusinessDays] INTEGER DEFAULT 0,
PRIMARY KEY (Months, BusinessDays)
); |
/*
MySQL Data Transfer
Source Host: 127.0.0.1
Source Database: tzproject
Target Host: 127.0.0.1
Target Database: tzproject
Date: 2019/7/16 16:53:58
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tb_docs
-- ----------------------------
DROP TABLE IF EXISTS `tb_docs`;
C... |
<filename>data/SQL/315.sp_organization_list.sql
DELIMITER //
DROP PROCEDURE IF EXISTS sp_organization_list //
/* 部署リスト */
CREATE PROCEDURE sp_organization_list (
)
BEGIN
select s.id
, s.name
, count(distinct msp1.id) as member_count
, group_concat(distinct concat(m.first_name, ' ', m.last_name, if(ps.p... |
<filename>EdFi.Ods.Utilities.Migration/Scripts/MsSql/02Upgrade/v24_to_v25/11 Create Constraints/51690 OpenStaffPosition [FK].sql
-- SPDX-License-Identifier: Apache-2.0
-- Licensed to the Ed-Fi Alliance under one or more agreements.
-- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
-... |
#Materials
INSERT INTO Materials (MID, MName, UID, MPath, UploadTime)
Values ('123001','BlackWidow1', 'ScarlettJohansson', '/Users/ft/Desktop/bw1.jpg', '2017-01-05 18:00:00' );
INSERT INTO Materials (MID, MName, UID, MPath, UploadTime)
Values ('123002','BlackWidow2', 'ScarlettJohansson', '/Users/ft/Desktop/bw2.jpg', ... |
-- Changeset changelog-7.17.1.0.yaml::7.17.1.0-1::omp
-- update 'u_domain.preferences' mapping table
exec sp_rename 'u_domain_preferences.preferences', 'user_domain_instance_id'
GO
ALTER TABLE u_domain_preferences ADD preferences_object nvarchar(255)
GO
INSERT INTO DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTE... |
-- get_user_api_keys returns the api keys that belong to the requesting user.
create or replace function get_user_api_keys(p_user_id uuid)
returns setof json as $$
select coalesce(json_agg(akJSON), '[]')
from (
select akJSON
from api_key ak
cross join get_api_key(p_user_id, api_key_id) a... |
<filename>queries/mysql-proposal-list.sql<gh_stars>1-10
USE `decide.madrid_2019_09`;
SELECT p.id, p.date, p.title,
IFNULL(GROUP_CONCAT(DISTINCT pc.category), '') AS categories,
IFNULL(GROUP_CONCAT(DISTINCT pd.district), '') AS districts,
IFNULL(GROUP_CONCAT(DISTINCT pt.topic), '') AS topic
FROM... |
<filename>sql/012-CreatePhoto_Draft.sql
CREATE TABLE photo_draft (
photo_draft_id serial NOT NULL,
photo_id integer NOT NULL,
draft_id integer NOT NULL,
PRIMARY KEY (photo_draft_id),
FOREIGN KEY (photo_id)
REFERENCES photo (photo_id)
ON DELETE CASCADE,
FOREIGN KEY (draft_id)
REFER... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Авг 06 2016 г., 13:59
-- Версия сервера: 10.1.13-MariaDB
-- Версия PHP: 7.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS `test_varchar_table` (
`c1` varchar(20) NOT NULL,
`c2` varchar(20) DEFAULT NULL,
PRIMARY KEY (`c1`)
);
CREATE TABLE IF NOT EXISTS `test_blob_table` (
`c1` varchar(20) NOT NULL,
`c2` blob DEFAULT NULL,
PRIMARY KEY (`c1`)
);
CREATE TABLE IF NOT E... |
<reponame>uber-asido/backend
create table search_item
(
key uuid not null,
text text not null,
type integer not null,
constraint pk_search_item primary key (key)
)
|
CREATE TABLE orderDB.orders(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
mail varchar(1000) NOT NULL,
addressId BIGINT NOT NULL,
statusId TINYINT NOT NULL,
timestamp DATETIME,
FOREIGN KEY (addressId) REFERENCES orderDB.address(Id),
FOREIGN KEY (statusId) REFERENCES orderDB.orderstatus(Id)
);
DELI... |
<filename>public/db/tbhackers.sql
CREATE TABLE `tbhackers` (
`hacker_id` int(11) NOT NULL,
`name` varchar(20) NOT NULL,
PRIMARY KEY (`hacker_id`)
)
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 27, 2019 at 01:38 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>novirael/school-codebase
ALTER SESSION SET NLS_DATE_FORMAT='DD.MM.YYYY';
DROP TABLE MYSZY;
DROP TABLE LAPOWKI_WROGOW;
DROP TABLE LAPOWKI;
DROP TABLE INCYDENTY;
DROP TABLE KOTY;
DROP TABLE BANDY;
DROP TABLE FUNKCJE;
DROP TABLE WROGOWIE;
CREATE TABLE Wrogowie (
nazwa_wroga VARCHAR(15) CONSTRAINT pk_imie_wr... |
<reponame>postgresqlacademy/pwaf
--
CREATE OR REPLACE FUNCTION pwaf.t_wrapper(in_html_body text, in_title text)
RETURNS text AS
$BODY$
/**
* @package PWAF
* @author <NAME> (<EMAIL>)
* @copyright (C) 2014 postgresqlacademy.com and other contributors
* @license Licensed under the MIT License
*
* @version 0.1
*/... |
CREATE TABLE [dbo].[staging_roatp]
(
[Ukprn] INT NOT NULL,
[Name] NCHAR(1000) NOT NULL,
[ProviderType] NCHAR(100) NOT NULL,
[ParentCompanyGuarantee] BIT NOT NULL,
[NewOrganisationWithoutFinancialTrackRecord] BIT NOT NULL,
[StartDate] DATETIME2 NOT NULL,
[ProviderNotCurrentlyStartingNewAp... |
<reponame>Nikenilson/Nixplorer<filename>Banco de dados/BDNixplorer.sql
create table NixConstantes(
id int identity(1,1),
nome varchar(15),
valor int
) |
/* CREATE EXTERNAL TABLES */
-- Creating external table for yellow_tripdata
CREATE OR REPLACE EXTERNAL TABLE deng-338919.trips_data_all.yellow_tripdata_external
OPTIONS (
format = 'PARQUET',
uris = ['gs://dtc_data_lake_deng-338919/raw/yellow_tripdata_2019-*.parquet',
'gs://dtc_data_lake_deng-338919/raw/... |
<filename>backend/de.metas.dlm/base/src/main/sql/postgresql/system/5454174_sys_gh489_add_IsDLMPartitionBoundary_ddl.sql
-- 07.12.2016 14:58
-- URL zum Konzept
ALTER TABLE public.DLM_Partition_Config_Reference ADD Description VARCHAR(2000) DEFAULT NULL
;
-- 07.12.2016 15:07
-- URL zum Konzept
ALTER TABLE public.AD_Co... |
/* Replace with your SQL commands */
INSERT INTO "water"."scheduler"("task_type", "licence_ref", "task_config", "next_run", "last_run", "log", "status", "running")
VALUES ('refreshImport', '-', '{"count":"24","period":"hour"}', '2018-01-01 00:00:00', '2018-03-01 00:00:00', '', 0, 0);
|
<gh_stars>0
-- #df:checkEnv(df:default)#
-- normally not use in business like this: (it's test for DBFlute)
-- =======================================================================================
-- Default Env
-- ... |
/****** Object: StoredProcedure [dbo].[UpdateJobStepProcessingStats] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.UpdateJobStepProcessingStats
/****************************************************
**
** Desc:
** Appends new entries to T_Job_Step_Processing_Stats,
** showin... |
create table base_element
(
id INTEGER not null
constraint INDEX33557417
primary key,
code VARCHAR(255),
type VARCHAR(255),
name VARCHAR(255),
uri VARCHAR(255),
menu_id VARCHAR(255),
parent_id VARCHAR(255),
path VARCHAR(2000),
method VARCHAR(10),
description VARCHAR(255),
crt_time TIMESTAMP(26,6),
crt_... |
-- MySQL dump 10.13 Distrib 5.1.35, for Win32 (ia32)
--
-- Host: 10.0.1.151 Database: cms_demo
-- ------------------------------------------------------
-- Server version 5.1.54-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... |
<reponame>UMassMedIT/ProfilesRNS<filename>Documentation/SQL_Examples/ProcessDataMap.sql
/***************************************************************************
* *
* ### ProcessDataMap Example Script ### *... |
<reponame>Zhaojia2019/cubrid-testcases
create class test_class (date_col date, time_col time, timestamp_col timestamp, datetime_col datetimetz);
create index idx_datetime_col on test_class(datetime_col);
drop index idx_datetime_col on test_class;
drop class test_class; |
<gh_stars>0
CREATE DATABASE stocks_prod;
CREATE DATABASE stocks_dev;
CREATE DATABASE stocks_test; |
-- phpMyAdmin SQL Dump
-- version 4.2.10
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 14. Nov 2014 um 15:34
-- Server Version: 5.5.39-MariaDB-0ubuntu0.14.04.1
-- PHP-Version: 5.5.9-1ubuntu4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
--
-- Setup for the article:
-- https://dbwebb.se/kunskap/kom-igang-med-php-pdo-och-mysql
--
--
-- Create the database with a test user
--
DROP DATABASE IF EXISTS oophp;
CREATE DATABASE IF NOT EXISTS oophp;
DROP USER IF EXISTS 'user'@'localhost';
CREATE USER 'user'@'localhost'
IDENTIFIED
WITH mysql_native_password --... |
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- create view designs as SELECT * from artworks where regexp_replace(title, '^.* ', '')::int % 100 = 0;
|
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 25, 2022 at 04:24 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<reponame>webersongao/GaoCenter<gh_stars>1-10
UPDATE `[#DB_PREFIX#]inbox_dialog` SET sender_unread = 0 WHERE sender_count = 0;
UPDATE `[#DB_PREFIX#]inbox_dialog` SET recipient_unread = 0 WHERE recipient_count = 0; |
<reponame>pradeepkumarcm-egov/DIGIT-Dev<filename>municipal-services/tl-services/src/main/resources/db/migration/main/V202009251948334__tl_index_ddl.sql
CREATE INDEX IF NOT EXISTS index_eg_tl_tradelicensedetail_tradelicenseid ON eg_tl_tradelicensedetail (tradelicenseid);
CREATE INDEX IF NOT EXISTS index_eg_tl_address_t... |
<gh_stars>10-100
--
-- CzechIdM 9 Flyway script
-- BCV solutions s.r.o.
--
-- add role environment attribute
ALTER TABLE idm_role ADD environment nvarchar(255);
CREATE INDEX idx_idm_role_environment
ON idm_role(environment);
ALTER TABLE idm_role_a ADD environment nvarchar(255);
ALTER TABLE idm_role_a ADD environmen... |
<reponame>tsouchlarakis/imessage-extractor<gh_stars>1-10
drop view if exists {pg_schema}.message_vw;
create view {pg_schema}.message_vw as
with m as (
select m."ROWID" as message_id
, to_timestamp(((m."date"::double precision / 1000000000::double precision)::numeric + '978307200'::numeric)::double preci... |
<gh_stars>10-100
CREATE EXTERNAL TABLE [fhir].[SearchParameter] (
[resourceType] NVARCHAR(4000),
[id] VARCHAR(64),
[meta.id] NVARCHAR(4000),
[meta.extension] NVARCHAR(MAX),
[meta.versionId] VARCHAR(64),
[meta.lastUpdated] VARCHAR(30),
[meta.source] VARCHAR(256),
[meta.profile] VARCHAR(MA... |
<reponame>SummerSad/HCMUS-Lectures
use test_procedure_func
go
-- Viet ham tinh so tien khi giao dich tai khoan
-- so tien < 10 kq = sotien + 4
-- so tien > 10
-- Vang: kq = sotien * 1.05
-- Bac, dong la 1.1 va 1.2
alter function f_tinhtien(@sotien float, @loaitk nchar(4))
returns float
as
begin
if(@sotien < 10)
ret... |
<gh_stars>1000+
create database if not exists git_webhook character set utf8 collate utf8_general_ci;
|
-- 2020-06-05T10:35:55.838Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2020-06-05 13:35:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=570845
;
-- 2020-06-05T10:35:56.460Z
-- I forgot to set the DICTIONARY_ID_COMMENTS Syst... |
<reponame>Ambal/mangos
ALTER TABLE `quest_template` ADD COLUMN `CharTitleId` tinyint(3) unsigned NOT NULL default '0' AFTER `SpecialFlags`;
ALTER TABLE `quest_template` ADD COLUMN `RewSpellCast` mediumint(8) unsigned NOT NULL default '0' AFTER `RewSpell`;
|
create or replace FUNCTION VALIDATECC(cc_number IN VARCHAR2)
RETURN VARCHAR2 AS
l_status CREDITCARDINFO.STATUS%TYPE;
BEGIN
select status
into l_status
from creditcardinfo
where ccnumber = cc_number;
RETURN l_status;
EXCEPTION
WHEN NO_DATA_FOUND THEN
raise_ap... |
<filename>schema/verify/tables/application_review_step.sql<gh_stars>1-10
-- Verify ggircs-portal:tables/application_review_step on pg
begin;
select pg_catalog.has_table_privilege('ggircs_portal.application_review_step', 'select');
-- ciip_administrator Grants
select ggircs_portal_private.verify_grant('select', 'appl... |
<filename>sql/2021/accessibility/form_required_controls.sql
#standardSQL
# Various stats for required form controls (form controls being: input, select, textarea)
CREATE TEMPORARY FUNCTION requiredControls(payload STRING)
RETURNS STRUCT<total INT64, asterisk INT64, required_attribute INT64, aria_required INT64, all_thr... |
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may not... |
<gh_stars>1-10
-- Drop table
-- DROP TABLE public.shp_salesorderdetail;
CREATE TABLE public.shp_salesorderdetail (
row_id serial4 NOT NULL,
salesorder_item varchar(255) NOT NULL,
salesorder_qty int4 NOT NULL,
ship_qty int4 NULL,
subtotal numeric(12, 2) NULL,
customer_po varchar(255) NOT NULL,
customer_pn varch... |
<gh_stars>0
-- @author prabhd
-- @created 2014-04-01 12:00:00
-- @modified 2012-04-01 12:00:00
-- @tags dml MPP-21090 ORCA
-- @product_version gpdb: [4.3-]
-- @optimizer_mode on
-- @description Tests for MPP-21090
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS cha... |
<reponame>CBIIT/camod
/*L
Copyright SAIC
Copyright SAIC-Frederick
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/camod/LICENSE.txt for details.
L*/
-- Update the roles for a test user (ran on all tiers except prod)
Delete from PARTY_ROLE pr
where pr.PARTY_ID ... |
-- @testpoint:opengauss关键字rollup(非保留),作为游标名
--前置条件
drop table if exists rollup_test cascade;
create table rollup_test(cid int,fid int);
--关键字不带引号-成功
start transaction;
cursor rollup for select * from rollup_test order by 1;
close rollup;
end;
--关键字带双引号-成功
start transaction;
cursor "rollup" for select * from rollup_t... |
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: heureuxmillions
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... |
-- Adminer 4.2.5 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `m_menu`;
CREATE TABLE `m_menu` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`parent_id` tinyint(3) unsigned NOT NULL DEFAULT '0',
`men... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 22, 2021 at 12:39 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<gh_stars>0
-- --------------------------------------------------------
-- Host: localhost
-- Versi server: 5.7.24 - MySQL Community Server (GPL)
-- OS Server: Win64
-- HeidiSQL Versi: 10.2.0.5599
-- -----------------------------------------------... |
<filename>Prisma_DATAINICIAL.sql
use prisma;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 1;
START TRANSACTION;
SET time_zone = "+00:00";
/*
Clients:
Physical client type == 1
Juridical client type == 2
Coins:
id=1 must be Colones
id=2 must be Dolars
Work states:
1 - Recepción
2- Entregado... |
<reponame>ruaridhw/london-tube<gh_stars>0
--' ---
--' title: "Inbound Graph"
--' ---
--'
--' PostgreSQL view of all the distinct RouteLinks by Line
--' with additional info such as StopPoint Latitude and Longitude
--'
--' [Source code](https://github.com/ruaridhw/london-tube/blob/master/2_analysis/sql/InboundGraph.sql... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 24, 2017 at 07:33 PM
-- Server version: 5.7.17-0ubuntu0.16.04.1
-- PHP Version: 7.0.15-0ubuntu0.16.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 30, 2021 at 05:58 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
create table lists (
id int NOT NULL AUTO_INCREMENT,
group_id int(11),
first_name varchar(255),
last_name varchar(255),
mobile_number varchar(255),
amount varchar(255),
code varchar(20),
created_date int(11),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table tracking (
id int N... |
INSERT INTO employeeTracker_DB.departments(name)
VALUES ("Sales"),
("Engineering"),
("Accounting"),
("Administration"),
("Human Resources"),
("Information Technology");
INSERT INTO employeeTracker_DB.roles(title, salary, department_id)
VALUES ("Sales Associate", 35000, 1),
("Sales Manager", 65000, 1),
("Director of Sa... |
<reponame>HigorSnt/odbm<filename>tests/files/out/function/test_3/result.sql
REVOKE EXECUTE ON get_address
FROM
PUBLIC;
DROP FUNCTION get_address;
DROP FUNCTION is_palindrome;
REVOKE EXECUTE ON MATH_FUNCTIONS.fsum
FROM
PUBLIC;
REVOKE DEBUG ON MATH_FUNCTIONS.fsum
FROM
user1;
DROP FUNCTION MATH_FUNCTIONS.fsum; |
<gh_stars>0
-- Reemplazar 'hash' por las contraseñas debidamente hasheadas
-- Reemplazar 'email' por el correo electrónico del usuario
INSERT INTO mfl_user (username, hash, fullname, email) VALUES ('agutierrez', 'hash', '<NAME>', 'email');
INSERT INTO mfl_user (username, hash, fullname, email) VALUES ('equispe', 'hash'... |
CREATE TABLE IF NOT EXISTS varselbestilling(
bestillingsid character varying(100) primary key,
eventid character varying(50),
fodselsnummer character varying(50),
systembruker character varying(100),
eventtidspunkt timestamp without time zone
)
|
<reponame>cwright04/MA678_MidtermProject<filename>01a_EDA.sql<gh_stars>0
/*Investigate Business Data*/
/*What is the distribution by state? Subset down to open businesses*/
/* Note: MA has the largest count*/
SELECT count(*), state from Business where is_open = '1' group by state ;
/*Look at the type of categories ar... |
GRANT ALL PRIVILEGES ON *.* TO 'benzoh'@'%';
FLUSH PRIVILEGES;
|
<gh_stars>1-10
-- New post sp
DROP procedure IF EXISTS `new_post`;
CREATE PROCEDURE `new_post`(
IN author VARCHAR(45),
IN permlink VARCHAR(512),
IN category VARCHAR(45),
IN title VARCHAR(512),
IN body TEXT,
IN url VARCHAR(512),
IN timestamp TIMESTAMP
)
BEGIN
DECLARE id INT DEFAULT 0;
SE... |
<filename>src/database/inserts.sql
INSERT INTO perfiles.crums (email_usr, telefono_usr, contrasena_usr, tipo_usr, fecha_registro_usr, fecha_ultimo_acceso_usr, ip_ultimo_acceso_usr, nombre_cm, direccion_cm, coordenadas_cm, rango_servicio_cm) VALUES ('<EMAIL>', '7531032495', '0afbf9c010d879c71a403220399e1ac5', 1, '2018-0... |
<reponame>paulyc/ExFATRestore
ALTER TABLE `file` ADD `parent_directory_id` BIGINT(20) UNSIGNED NULL;
ALTER TABLE `directory` ADD `parent_directory_id` BIGINT(20) UNSIGNED NULL;
|
alter table egbpa_ownership_transfer add column mailPwdRequired boolean default false;
alter table egbpa_ownership_transfer
add column owner_id bigint,
add column demand bigint,
add constraint FK_egbpa_ownership_OWNER FOREIGN KEY (owner_id)
REFERENCES EGBPA_APPLICANT(ID),
add CONSTRAINT FK_egbpa_ownership_DEMAND F... |
<reponame>ucarlos/CSC4320-Project2
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS `AudioDatabase` (
`database_id` INTEGER NOT NULL DEFAULT 0 PRIMARY KEY AUTOINCREMENT,
`track_name` TEXT NOT NULL DEFAULT 'Unknown Track',
`track_number` INTEGER NOT NULL DEFAULT 0,
`artist_name` TEXT NOT NULL DEFAULT 'Unknown Artist',
... |
CREATE TYPE order_types AS ENUM (
'GHC',
'NTS'
);
ALTER TABLE move_orders
ADD COLUMN order_type order_types,
ADD COLUMN order_type_detail text,
ADD COLUMN date_issued date,
ADD COLUMN report_by_date date;
|
<gh_stars>1-10
-- SQLite
select * from user;
select * from campaign_admin |
-- original: boundary1.test
-- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test
SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY x
;SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY a
;SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY a DESC
;SELECT a ... |
--1. List the following details of each employee: employee number, last name, first name, sex, and salary.
--
SELECT e.emp_no, e.last_name, e.first_name, e.sex, s.salary FROM employees e
JOIN salaries s ON s.emp_no = e.emp_no;
--
--2. List first name, last name, and hire date for employees who were hired in 1986.
--
SE... |
SET FOREIGN_KEY_CHECKS=0;
SHOW FULL TABLES FROM `taxi_dev` WHERE table_type = 'BASE TABLE';
DROP TABLE `taxi_dev`.`DATABASECHANGELOG`;
DROP TABLE `taxi_dev`.`DATABASECHANGELOGLOCK`;
DROP TABLE `taxi_dev`.`jhi_authority`;
DROP TABLE `taxi_dev`.`jhi_persistent_audit_event`;
DROP TABLE `taxi_dev`.`jhi_persistent_audi... |
insert into form(name, audit, description, entity_id) values ('Cadastro de Materiais', true, 'Cadastro e manutenção de materiais',6);
insert into form(name, audit, description, entity_id) values ('Cadastro de Superficie e absortancia', true, 'Cadastro e manutenção de superficies e absortancia',7);
insert into form(name... |
<filename>java-all-call-graph/src/main/resources/~jacg_sql/class_name.sql
CREATE TABLE if not exists class_name_{appName} (
full_name varchar(200) NOT NULL COMMENT '完整类名',
simple_name varchar(100) NOT NULL COMMENT '唯一类名',
PRIMARY KEY (full_name),
INDEX idx_cn_simple_name(simple_name)
) ENGINE=InnoDB DEFAUL... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-02-2021 a las 20:07:48
-- Versión del servidor: 10.4.13-MariaDB
-- Versión de PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
<reponame>KirillPronchuk/ImageApp
drop table if exists app_order cascade ;
|
-- update back the position_no value
UPDATE `institution_positions`
INNER JOIN `z_3006_institution_positions` ON `institution_positions`.`id` = `z_3006_institution_positions`.`id`
SET `institution_positions`.`position_no` = `z_3006_institution_positions`.`position_no`;
-- remove backup table
DROP TABLE IF EXISTS `z_30... |
<reponame>andrejpetras/quarkiverse-hibernate-types<filename>deployment/src/test/resources/import-custom.sql
INSERT INTO MyEntity(ID, PARAM) VALUES('1', '1#test1');
INSERT INTO MyEntity(ID, PARAM) VALUES('2', '2#test2');
|
<reponame>lihongwu19921215/NUTZ-ONEKEY
/*
list.role.by.user.id
*/
SELECT
r.*
FROM
t_role r
LEFT JOIN t_user_role ur ON r.id = ur.r_id
WHERE
ur.u_id = @userId
/*
find.roles.with.user.powerd.info.by.user.id
*/
SELECT
r.*, CASE sur.id IS NULL
WHEN 1 THEN
''
ELSE
'selected'
END AS has_role
FROM
t_role r
LEFT JOIN (
... |
ALTER TABLE iam_account ADD provisioned BOOLEAN;
update iam_account set provisioned = false;
ALTER TABLE iam_account ALTER COLUMN provisioned SET NOT NULL;
ALTER TABLE iam_account ALTER COLUMN provisioned SET DEFAULT false;
-- Add last login time column
ALTER TABLE iam_account ADD last_login_time TIMESTAMP; |
/*
Source Server : Local Sever
Source Server Type : MariaDB
Source Server Version : 100017
Source Host : localhost
Source Database : yayoi
Target Server Type : MariaDB
Target Server Version : 100017
File Encoding : utf-8
Date: 05/20/2015 19:19:08 PM
*/
SET NAMES utf8;
S... |
CREATE TABLE IF NOT EXISTS subscriptions (
subscription_id TEXT NOT NULL,
subscription_request TEXT UNIQUE,
PRIMARY KEY (subscription_id)
); |
<gh_stars>0
/*
Warnings:
- A unique constraint covering the columns `[name]` on the table `Supplier` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX `Supplier.name_unique` ON `Supplier`(`name`);
|
SET SERVEROUTPUT ON;
/*
nested tables
- we can delete any values (oposite to varrays)
- not stored consecutively
- are unbounded (no max size specified)
structure:
type type_name as table of value_data_type [NOT NULL];
create type at schema level:
create or replace type type_name ... |
<filename>src/Database/src/dueltank/dbo/Programmability/Stored Procedures/CardSearchByName.sql
CREATE PROCEDURE [dbo].[CardSearchByName]
@name nvarchar(255)
AS
BEGIN
SELECT
DISTINCT c.Id,
c.CardNumber,
c.Name,
c.Description,
c.CardLevel,
c.CardRank,
c.Atk,
c.Def,
c2.Id AS [CategoryId],
c2.Name AS... |
<filename>deployment/sql/pop_data.sql
USE `bk`;
INSERT INTO `Address` VALUES
(1,'Seljordvegen',204,'','3803','BØ I TELEMARK',NULL),
(2,'Roevegen',68,'','3803','BØ I TELEMARK',NULL),
(3,'Kyrkjevegen',167,'','3803','BØ I TELEMARK',NULL),
(4,'Roevegen',9,'B','3803','BØ I TELEMARK',NULL),
(5,'Roevegen',66,'','3803','BØ I... |
-- Adminer 4.7.3 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET NAMES utf8mb4;
CREATE DATABASE `inat_push_production` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_swedish_ci */;
USE `inat_push_production`;
DROP TABLE IF EXISTS `latest_update`;
CREATE TABLE `latest_update` (
`id` int(11) NOT NU... |
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 13, 2017 at 10:19 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... |
# Problem Statement: https://www.hackerrank.com/challenges/earnings-of-employees/problem
# Difficulty: Easy
# Score: 20
- # MySQL
SELECT a.earnings, count(*)
FROM (SELECT *, months*salary AS earnings
FROM Employee) AS a
GROUP BY a.earnings
ORDER BY a.earnings DESC LIMIT 1
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.2 (Debian 12.2-2.pgdg100+1)
-- Dumped by pg_dump version 12.2 (Debian 12.2-2.pgdg100+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;... |
CREATE TABLE `space_product_bill_of_material_item_data`
(
`BillOfMaterial` varchar(20) NOT NULL,
`BillOfMaterialCategory` varchar(20) NOT NULL,
`BillOfMaterialVariant` varchar(20) NOT NULL,
`BillOfMaterialVersion` varchar(20) NOT NULL,
`HeaderChangeDocument` ... |
-- file:jsonb.sql ln:1014 expect:true
select jsonb_set('{"a":1,"b":[4,5,[0,1,2],6,7],"c":{"d":4}}','{b,2,33}','{"foo":123}')
|
<reponame>tracyewilhelm/Employee-Tracker<filename>db/schema.sql
DROP DATABASE IF EXISTS hogwarts_db;
CREATE DATABASE hogwarts_db;
USE hogwarts_db;
CREATE TABLE departments (
department_name VARCHAR(50) NOT NULL,
department_id INT AUTO_INCREMENT PRIMARY KEY
);
CREATE TABLE roles (
job_title VARCHAR(50) NOT NUL... |
<filename>movie.sql
/* sqlite */
drop table if exists person;
drop table if exists movie;
drop table if exists cast_of;
drop table if exists sequel;
drop table if exists trivia;
drop view if exists associatedwith;
drop view if exists ages;
create table person(id int, name varchar(20), born date, death date);
create t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.